xref: /aosp_15_r20/art/test/064-field-access/src/other/PublicClass.java (revision 795d594fd825385562da6b089ea9b2033f3abf5a)
1*795d594fSAndroid Build Coastguard Worker /*
2*795d594fSAndroid Build Coastguard Worker  * Copyright (C) 2012 The Android Open Source Project
3*795d594fSAndroid Build Coastguard Worker  *
4*795d594fSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
5*795d594fSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
6*795d594fSAndroid Build Coastguard Worker  * You may obtain a copy of the License at
7*795d594fSAndroid Build Coastguard Worker  *
8*795d594fSAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
9*795d594fSAndroid Build Coastguard Worker  *
10*795d594fSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
11*795d594fSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
12*795d594fSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*795d594fSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
14*795d594fSAndroid Build Coastguard Worker  * limitations under the License.
15*795d594fSAndroid Build Coastguard Worker  */
16*795d594fSAndroid Build Coastguard Worker 
17*795d594fSAndroid Build Coastguard Worker package other;
18*795d594fSAndroid Build Coastguard Worker 
19*795d594fSAndroid Build Coastguard Worker // Class that makes the ProtectedClass sub-classable by classes outside of package other.
20*795d594fSAndroid Build Coastguard Worker public class PublicClass extends ProtectedClass {
21*795d594fSAndroid Build Coastguard Worker     public boolean otherPublicClassPublicBooleanInstanceField = true;
22*795d594fSAndroid Build Coastguard Worker     public byte otherPublicClassPublicByteInstanceField = -2;
23*795d594fSAndroid Build Coastguard Worker     public char otherPublicClassPublicCharInstanceField = (char)-3;
24*795d594fSAndroid Build Coastguard Worker     public short otherPublicClassPublicShortInstanceField = -4;
25*795d594fSAndroid Build Coastguard Worker     public int otherPublicClassPublicIntInstanceField = -5;
26*795d594fSAndroid Build Coastguard Worker     public long otherPublicClassPublicLongInstanceField = -6;
27*795d594fSAndroid Build Coastguard Worker     public float otherPublicClassPublicFloatInstanceField = -7.0f;
28*795d594fSAndroid Build Coastguard Worker     public double otherPublicClassPublicDoubleInstanceField = -8.0;
29*795d594fSAndroid Build Coastguard Worker     public Object otherPublicClassPublicObjectInstanceField = "-9";
30*795d594fSAndroid Build Coastguard Worker 
31*795d594fSAndroid Build Coastguard Worker     protected boolean otherPublicClassProtectedBooleanInstanceField = true;
32*795d594fSAndroid Build Coastguard Worker     protected byte otherPublicClassProtectedByteInstanceField = -10;
33*795d594fSAndroid Build Coastguard Worker     protected char otherPublicClassProtectedCharInstanceField = (char)-11;
34*795d594fSAndroid Build Coastguard Worker     protected short otherPublicClassProtectedShortInstanceField = -12;
35*795d594fSAndroid Build Coastguard Worker     protected int otherPublicClassProtectedIntInstanceField = -13;
36*795d594fSAndroid Build Coastguard Worker     protected long otherPublicClassProtectedLongInstanceField = -14;
37*795d594fSAndroid Build Coastguard Worker     protected float otherPublicClassProtectedFloatInstanceField = -15.0f;
38*795d594fSAndroid Build Coastguard Worker     protected double otherPublicClassProtectedDoubleInstanceField = -16.0;
39*795d594fSAndroid Build Coastguard Worker     protected Object otherPublicClassProtectedObjectInstanceField = "-17";
40*795d594fSAndroid Build Coastguard Worker 
41*795d594fSAndroid Build Coastguard Worker     private boolean otherPublicClassPrivateBooleanInstanceField = true;
42*795d594fSAndroid Build Coastguard Worker     private byte otherPublicClassPrivateByteInstanceField = -18;
43*795d594fSAndroid Build Coastguard Worker     private char otherPublicClassPrivateCharInstanceField = (char)-19;
44*795d594fSAndroid Build Coastguard Worker     private short otherPublicClassPrivateShortInstanceField = -20;
45*795d594fSAndroid Build Coastguard Worker     private int otherPublicClassPrivateIntInstanceField = -21;
46*795d594fSAndroid Build Coastguard Worker     private long otherPublicClassPrivateLongInstanceField = -22;
47*795d594fSAndroid Build Coastguard Worker     private float otherPublicClassPrivateFloatInstanceField = -23.0f;
48*795d594fSAndroid Build Coastguard Worker     private double otherPublicClassPrivateDoubleInstanceField = -24.0;
49*795d594fSAndroid Build Coastguard Worker     private Object otherPublicClassPrivateObjectInstanceField = "-25";
50*795d594fSAndroid Build Coastguard Worker 
51*795d594fSAndroid Build Coastguard Worker  /* package */ boolean otherPublicClassPackageBooleanInstanceField = true;
52*795d594fSAndroid Build Coastguard Worker  /* package */ byte otherPublicClassPackageByteInstanceField = -26;
53*795d594fSAndroid Build Coastguard Worker  /* package */ char otherPublicClassPackageCharInstanceField = (char)-27;
54*795d594fSAndroid Build Coastguard Worker  /* package */ short otherPublicClassPackageShortInstanceField = -28;
55*795d594fSAndroid Build Coastguard Worker  /* package */ int otherPublicClassPackageIntInstanceField = -29;
56*795d594fSAndroid Build Coastguard Worker  /* package */ long otherPublicClassPackageLongInstanceField = -30;
57*795d594fSAndroid Build Coastguard Worker  /* package */ float otherPublicClassPackageFloatInstanceField = -31.0f;
58*795d594fSAndroid Build Coastguard Worker  /* package */ double otherPublicClassPackageDoubleInstanceField = -32.0;
59*795d594fSAndroid Build Coastguard Worker  /* package */ Object otherPublicClassPackageObjectInstanceField = "-33";
60*795d594fSAndroid Build Coastguard Worker 
61*795d594fSAndroid Build Coastguard Worker     public static boolean otherPublicClassPublicBooleanStaticField = true;
62*795d594fSAndroid Build Coastguard Worker     public static byte otherPublicClassPublicByteStaticField = -34;
63*795d594fSAndroid Build Coastguard Worker     public static char otherPublicClassPublicCharStaticField = (char)-35;
64*795d594fSAndroid Build Coastguard Worker     public static short otherPublicClassPublicShortStaticField = -36;
65*795d594fSAndroid Build Coastguard Worker     public static int otherPublicClassPublicIntStaticField = -37;
66*795d594fSAndroid Build Coastguard Worker     public static long otherPublicClassPublicLongStaticField = -38;
67*795d594fSAndroid Build Coastguard Worker     public static float otherPublicClassPublicFloatStaticField = -39.0f;
68*795d594fSAndroid Build Coastguard Worker     public static double otherPublicClassPublicDoubleStaticField = -40.0;
69*795d594fSAndroid Build Coastguard Worker     public static Object otherPublicClassPublicObjectStaticField = "-41";
70*795d594fSAndroid Build Coastguard Worker 
71*795d594fSAndroid Build Coastguard Worker     protected static boolean otherPublicClassProtectedBooleanStaticField = true;
72*795d594fSAndroid Build Coastguard Worker     protected static byte otherPublicClassProtectedByteStaticField = -42;
73*795d594fSAndroid Build Coastguard Worker     protected static char otherPublicClassProtectedCharStaticField = (char)-43;
74*795d594fSAndroid Build Coastguard Worker     protected static short otherPublicClassProtectedShortStaticField = -44;
75*795d594fSAndroid Build Coastguard Worker     protected static int otherPublicClassProtectedIntStaticField = -45;
76*795d594fSAndroid Build Coastguard Worker     protected static long otherPublicClassProtectedLongStaticField = -46;
77*795d594fSAndroid Build Coastguard Worker     protected static float otherPublicClassProtectedFloatStaticField = -47.0f;
78*795d594fSAndroid Build Coastguard Worker     protected static double otherPublicClassProtectedDoubleStaticField = -48.0;
79*795d594fSAndroid Build Coastguard Worker     protected static Object otherPublicClassProtectedObjectStaticField = "-49";
80*795d594fSAndroid Build Coastguard Worker 
81*795d594fSAndroid Build Coastguard Worker     private static boolean otherPublicClassPrivateBooleanStaticField = true;
82*795d594fSAndroid Build Coastguard Worker     private static byte otherPublicClassPrivateByteStaticField = -50;
83*795d594fSAndroid Build Coastguard Worker     private static char otherPublicClassPrivateCharStaticField = (char)-51;
84*795d594fSAndroid Build Coastguard Worker     private static short otherPublicClassPrivateShortStaticField = -52;
85*795d594fSAndroid Build Coastguard Worker     private static int otherPublicClassPrivateIntStaticField = -53;
86*795d594fSAndroid Build Coastguard Worker     private static long otherPublicClassPrivateLongStaticField = -54;
87*795d594fSAndroid Build Coastguard Worker     private static float otherPublicClassPrivateFloatStaticField = -55.0f;
88*795d594fSAndroid Build Coastguard Worker     private static double otherPublicClassPrivateDoubleStaticField = -56.0;
89*795d594fSAndroid Build Coastguard Worker     private static Object otherPublicClassPrivateObjectStaticField = "-57";
90*795d594fSAndroid Build Coastguard Worker 
91*795d594fSAndroid Build Coastguard Worker  /* package */ static boolean otherPublicClassPackageBooleanStaticField = true;
92*795d594fSAndroid Build Coastguard Worker  /* package */ static byte otherPublicClassPackageByteStaticField = -58;
93*795d594fSAndroid Build Coastguard Worker  /* package */ static char otherPublicClassPackageCharStaticField = (char)-59;
94*795d594fSAndroid Build Coastguard Worker  /* package */ static short otherPublicClassPackageShortStaticField = -60;
95*795d594fSAndroid Build Coastguard Worker  /* package */ static int otherPublicClassPackageIntStaticField = -61;
96*795d594fSAndroid Build Coastguard Worker  /* package */ static long otherPublicClassPackageLongStaticField = -62;
97*795d594fSAndroid Build Coastguard Worker  /* package */ static float otherPublicClassPackageFloatStaticField = -63.0f;
98*795d594fSAndroid Build Coastguard Worker  /* package */ static double otherPublicClassPackageDoubleStaticField = -64.0;
99*795d594fSAndroid Build Coastguard Worker  /* package */ static Object otherPublicClassPackageObjectStaticField = "-65";
100*795d594fSAndroid Build Coastguard Worker 
otherPublicMethod()101*795d594fSAndroid Build Coastguard Worker     public void otherPublicMethod() { }
otherProtectedMethod()102*795d594fSAndroid Build Coastguard Worker     protected void otherProtectedMethod() { }
otherPrivateMethod()103*795d594fSAndroid Build Coastguard Worker     private void otherPrivateMethod() { }
otherPackageMethod()104*795d594fSAndroid Build Coastguard Worker     /* package */ void otherPackageMethod() { }
105*795d594fSAndroid Build Coastguard Worker }
106