| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | public class ParentClass { |
| 18 | public ParentClass() {} |
| 19 | |
| 20 | // INSTANCE FIELD |
| 21 | |
| 22 | public int fieldPublicWhitelist = 211; |
| 23 | int fieldPackageWhitelist = 212; |
| 24 | protected int fieldProtectedWhitelist = 213; |
| 25 | private int fieldPrivateWhitelist = 214; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 26 | public int fieldPublicWhitelistB = 215; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 27 | |
| 28 | public int fieldPublicLightGreylist = 221; |
| 29 | int fieldPackageLightGreylist = 222; |
| 30 | protected int fieldProtectedLightGreylist = 223; |
| 31 | private int fieldPrivateLightGreylist = 224; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 32 | public int fieldPublicLightGreylistB = 225; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 33 | |
| 34 | public int fieldPublicDarkGreylist = 231; |
| 35 | int fieldPackageDarkGreylist = 232; |
| 36 | protected int fieldProtectedDarkGreylist = 233; |
| 37 | private int fieldPrivateDarkGreylist = 234; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 38 | public int fieldPublicDarkGreylistB = 235; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 39 | |
| 40 | public int fieldPublicBlacklist = 241; |
| 41 | int fieldPackageBlacklist = 242; |
| 42 | protected int fieldProtectedBlacklist = 243; |
| 43 | private int fieldPrivateBlacklist = 244; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 44 | public int fieldPublicBlacklistB = 245; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 45 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 46 | public int fieldPublicBlacklistAndCorePlatformApi = 251; |
| 47 | int fieldPackageBlacklistAndCorePlatformApi = 252; |
| 48 | protected int fieldProtectedBlacklistAndCorePlatformApi = 253; |
| 49 | private int fieldPrivateBlacklistAndCorePlatformApi = 254; |
| 50 | public int fieldPublicBlacklistAndCorePlatformApiB = 255; |
| 51 | |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 52 | // STATIC FIELD |
| 53 | |
| 54 | public static int fieldPublicStaticWhitelist = 111; |
| 55 | static int fieldPackageStaticWhitelist = 112; |
| 56 | protected static int fieldProtectedStaticWhitelist = 113; |
| 57 | private static int fieldPrivateStaticWhitelist = 114; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 58 | public static int fieldPublicStaticWhitelistB = 115; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 59 | |
| 60 | public static int fieldPublicStaticLightGreylist = 121; |
| 61 | static int fieldPackageStaticLightGreylist = 122; |
| 62 | protected static int fieldProtectedStaticLightGreylist = 123; |
| 63 | private static int fieldPrivateStaticLightGreylist = 124; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 64 | public static int fieldPublicStaticLightGreylistB = 125; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 65 | |
| 66 | public static int fieldPublicStaticDarkGreylist = 131; |
| 67 | static int fieldPackageStaticDarkGreylist = 132; |
| 68 | protected static int fieldProtectedStaticDarkGreylist = 133; |
| 69 | private static int fieldPrivateStaticDarkGreylist = 134; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 70 | public static int fieldPublicStaticDarkGreylistB = 135; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 71 | |
| 72 | public static int fieldPublicStaticBlacklist = 141; |
| 73 | static int fieldPackageStaticBlacklist = 142; |
| 74 | protected static int fieldProtectedStaticBlacklist = 143; |
| 75 | private static int fieldPrivateStaticBlacklist = 144; |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 76 | public static int fieldPublicStaticBlacklistB = 145; |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 77 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 78 | public static int fieldPublicStaticBlacklistAndCorePlatformApi = 151; |
| 79 | static int fieldPackageStaticBlacklistAndCorePlatformApi = 152; |
| 80 | protected static int fieldProtectedStaticBlacklistAndCorePlatformApi = 153; |
| 81 | private static int fieldPrivateStaticBlacklistAndCorePlatformApi = 154; |
| 82 | public static int fieldPublicStaticBlacklistAndCorePlatformApiB = 155; |
| 83 | |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 84 | // INSTANCE METHOD |
| 85 | |
| 86 | public int methodPublicWhitelist() { return 411; } |
| 87 | int methodPackageWhitelist() { return 412; } |
| 88 | protected int methodProtectedWhitelist() { return 413; } |
| 89 | private int methodPrivateWhitelist() { return 414; } |
| 90 | |
| 91 | public int methodPublicLightGreylist() { return 421; } |
| 92 | int methodPackageLightGreylist() { return 422; } |
| 93 | protected int methodProtectedLightGreylist() { return 423; } |
| 94 | private int methodPrivateLightGreylist() { return 424; } |
| 95 | |
| 96 | public int methodPublicDarkGreylist() { return 431; } |
| 97 | int methodPackageDarkGreylist() { return 432; } |
| 98 | protected int methodProtectedDarkGreylist() { return 433; } |
| 99 | private int methodPrivateDarkGreylist() { return 434; } |
| 100 | |
| 101 | public int methodPublicBlacklist() { return 441; } |
| 102 | int methodPackageBlacklist() { return 442; } |
| 103 | protected int methodProtectedBlacklist() { return 443; } |
| 104 | private int methodPrivateBlacklist() { return 444; } |
| 105 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 106 | public int methodPublicBlacklistAndCorePlatformApi() { return 451; } |
| 107 | int methodPackageBlacklistAndCorePlatformApi() { return 452; } |
| 108 | protected int methodProtectedBlacklistAndCorePlatformApi() { return 453; } |
| 109 | private int methodPrivateBlacklistAndCorePlatformApi() { return 454; } |
| 110 | |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 111 | // STATIC METHOD |
| 112 | |
| 113 | public static int methodPublicStaticWhitelist() { return 311; } |
| 114 | static int methodPackageStaticWhitelist() { return 312; } |
| 115 | protected static int methodProtectedStaticWhitelist() { return 313; } |
| 116 | private static int methodPrivateStaticWhitelist() { return 314; } |
| 117 | |
| 118 | public static int methodPublicStaticLightGreylist() { return 321; } |
| 119 | static int methodPackageStaticLightGreylist() { return 322; } |
| 120 | protected static int methodProtectedStaticLightGreylist() { return 323; } |
| 121 | private static int methodPrivateStaticLightGreylist() { return 324; } |
| 122 | |
| 123 | public static int methodPublicStaticDarkGreylist() { return 331; } |
| 124 | static int methodPackageStaticDarkGreylist() { return 332; } |
| 125 | protected static int methodProtectedStaticDarkGreylist() { return 333; } |
| 126 | private static int methodPrivateStaticDarkGreylist() { return 334; } |
| 127 | |
| 128 | public static int methodPublicStaticBlacklist() { return 341; } |
| 129 | static int methodPackageStaticBlacklist() { return 342; } |
| 130 | protected static int methodProtectedStaticBlacklist() { return 343; } |
| 131 | private static int methodPrivateStaticBlacklist() { return 344; } |
| 132 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 133 | public static int methodPublicStaticBlacklistAndCorePlatformApi() { return 351; } |
| 134 | static int methodPackageStaticBlacklistAndCorePlatformApi() { return 352; } |
| 135 | protected static int methodProtectedStaticBlacklistAndCorePlatformApi() { return 353; } |
| 136 | private static int methodPrivateStaticBlacklistAndCorePlatformApi() { return 354; } |
| 137 | |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 138 | // CONSTRUCTOR |
| 139 | |
| 140 | // Whitelist |
| 141 | public ParentClass(int x, short y) {} |
| 142 | ParentClass(float x, short y) {} |
| 143 | protected ParentClass(long x, short y) {} |
| 144 | private ParentClass(double x, short y) {} |
| 145 | |
| 146 | // Light greylist |
| 147 | public ParentClass(int x, boolean y) {} |
| 148 | ParentClass(float x, boolean y) {} |
| 149 | protected ParentClass(long x, boolean y) {} |
| 150 | private ParentClass(double x, boolean y) {} |
| 151 | |
| 152 | // Dark greylist |
| 153 | public ParentClass(int x, byte y) {} |
| 154 | ParentClass(float x, byte y) {} |
| 155 | protected ParentClass(long x, byte y) {} |
| 156 | private ParentClass(double x, byte y) {} |
| 157 | |
| 158 | // Blacklist |
| 159 | public ParentClass(int x, char y) {} |
| 160 | ParentClass(float x, char y) {} |
| 161 | protected ParentClass(long x, char y) {} |
| 162 | private ParentClass(double x, char y) {} |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 163 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 164 | // Blacklist and CorePlatformApi |
| 165 | public ParentClass(int x, int y) {} |
| 166 | ParentClass(float x, int y) {} |
| 167 | protected ParentClass(long x, int y) {} |
| 168 | private ParentClass(double x, int y) {} |
| 169 | |
| David Brazdil | 8ce3bfa | 2018-03-12 18:01:18 +0000 | [diff] [blame] | 170 | // HELPERS |
| 171 | |
| 172 | public int callMethodPublicWhitelist() { return methodPublicWhitelist(); } |
| 173 | public int callMethodPackageWhitelist() { return methodPackageWhitelist(); } |
| 174 | public int callMethodProtectedWhitelist() { return methodProtectedWhitelist(); } |
| 175 | |
| 176 | public int callMethodPublicLightGreylist() { return methodPublicLightGreylist(); } |
| 177 | public int callMethodPackageLightGreylist() { return methodPackageLightGreylist(); } |
| 178 | public int callMethodProtectedLightGreylist() { return methodProtectedLightGreylist(); } |
| 179 | |
| 180 | public int callMethodPublicDarkGreylist() { return methodPublicDarkGreylist(); } |
| 181 | public int callMethodPackageDarkGreylist() { return methodPackageDarkGreylist(); } |
| 182 | public int callMethodProtectedDarkGreylist() { return methodProtectedDarkGreylist(); } |
| 183 | |
| 184 | public int callMethodPublicBlacklist() { return methodPublicBlacklist(); } |
| 185 | public int callMethodPackageBlacklist() { return methodPackageBlacklist(); } |
| 186 | public int callMethodProtectedBlacklist() { return methodProtectedBlacklist(); } |
| 187 | |
| David Brazdil | e768182 | 2018-12-14 16:25:33 +0000 | [diff] [blame] | 188 | public int callMethodPublicBlacklistAndCorePlatformApi() { |
| 189 | return methodPublicBlacklistAndCorePlatformApi(); |
| 190 | } |
| 191 | |
| 192 | public int callMethodPackageBlacklistAndCorePlatformApi() { |
| 193 | return methodPackageBlacklistAndCorePlatformApi(); |
| 194 | } |
| 195 | |
| 196 | public int callMethodProtectedBlacklistAndCorePlatformApi() { |
| 197 | return methodProtectedBlacklistAndCorePlatformApi(); |
| 198 | } |
| David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 199 | } |