xref: /aosp_15_r20/art/test/064-field-access/src/other/ProtectedClass.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 cannot be accessed outside of this package.
20*795d594fSAndroid Build Coastguard Worker class ProtectedClass {
21*795d594fSAndroid Build Coastguard Worker     public boolean otherProtectedClassPublicBooleanInstanceField = true;
22*795d594fSAndroid Build Coastguard Worker     public byte otherProtectedClassPublicByteInstanceField = 2;
23*795d594fSAndroid Build Coastguard Worker     public char otherProtectedClassPublicCharInstanceField = 3;
24*795d594fSAndroid Build Coastguard Worker     public short otherProtectedClassPublicShortInstanceField = 4;
25*795d594fSAndroid Build Coastguard Worker     public int otherProtectedClassPublicIntInstanceField = 5;
26*795d594fSAndroid Build Coastguard Worker     public long otherProtectedClassPublicLongInstanceField = 6;
27*795d594fSAndroid Build Coastguard Worker     public float otherProtectedClassPublicFloatInstanceField = 7.0f;
28*795d594fSAndroid Build Coastguard Worker     public double otherProtectedClassPublicDoubleInstanceField = 8.0;
29*795d594fSAndroid Build Coastguard Worker     public Object otherProtectedClassPublicObjectInstanceField = "9";
30*795d594fSAndroid Build Coastguard Worker 
31*795d594fSAndroid Build Coastguard Worker     protected boolean otherProtectedClassProtectedBooleanInstanceField = true;
32*795d594fSAndroid Build Coastguard Worker     protected byte otherProtectedClassProtectedByteInstanceField = 10;
33*795d594fSAndroid Build Coastguard Worker     protected char otherProtectedClassProtectedCharInstanceField = 11;
34*795d594fSAndroid Build Coastguard Worker     protected short otherProtectedClassProtectedShortInstanceField = 12;
35*795d594fSAndroid Build Coastguard Worker     protected int otherProtectedClassProtectedIntInstanceField = 13;
36*795d594fSAndroid Build Coastguard Worker     protected long otherProtectedClassProtectedLongInstanceField = 14;
37*795d594fSAndroid Build Coastguard Worker     protected float otherProtectedClassProtectedFloatInstanceField = 15.0f;
38*795d594fSAndroid Build Coastguard Worker     protected double otherProtectedClassProtectedDoubleInstanceField = 16.0;
39*795d594fSAndroid Build Coastguard Worker     protected Object otherProtectedClassProtectedObjectInstanceField = "17";
40*795d594fSAndroid Build Coastguard Worker 
41*795d594fSAndroid Build Coastguard Worker     private boolean otherProtectedClassPrivateBooleanInstanceField = true;
42*795d594fSAndroid Build Coastguard Worker     private byte otherProtectedClassPrivateByteInstanceField = 18;
43*795d594fSAndroid Build Coastguard Worker     private char otherProtectedClassPrivateCharInstanceField = 19;
44*795d594fSAndroid Build Coastguard Worker     private short otherProtectedClassPrivateShortInstanceField = 20;
45*795d594fSAndroid Build Coastguard Worker     private int otherProtectedClassPrivateIntInstanceField = 21;
46*795d594fSAndroid Build Coastguard Worker     private long otherProtectedClassPrivateLongInstanceField = 22;
47*795d594fSAndroid Build Coastguard Worker     private float otherProtectedClassPrivateFloatInstanceField = 23.0f;
48*795d594fSAndroid Build Coastguard Worker     private double otherProtectedClassPrivateDoubleInstanceField = 24.0;
49*795d594fSAndroid Build Coastguard Worker     private Object otherProtectedClassPrivateObjectInstanceField = "25";
50*795d594fSAndroid Build Coastguard Worker 
51*795d594fSAndroid Build Coastguard Worker  /* package */ boolean otherProtectedClassPackageBooleanInstanceField = true;
52*795d594fSAndroid Build Coastguard Worker  /* package */ byte otherProtectedClassPackageByteInstanceField = 26;
53*795d594fSAndroid Build Coastguard Worker  /* package */ char otherProtectedClassPackageCharInstanceField = 27;
54*795d594fSAndroid Build Coastguard Worker  /* package */ short otherProtectedClassPackageShortInstanceField = 28;
55*795d594fSAndroid Build Coastguard Worker  /* package */ int otherProtectedClassPackageIntInstanceField = 29;
56*795d594fSAndroid Build Coastguard Worker  /* package */ long otherProtectedClassPackageLongInstanceField = 30;
57*795d594fSAndroid Build Coastguard Worker  /* package */ float otherProtectedClassPackageFloatInstanceField = 31.0f;
58*795d594fSAndroid Build Coastguard Worker  /* package */ double otherProtectedClassPackageDoubleInstanceField = 32.0;
59*795d594fSAndroid Build Coastguard Worker  /* package */ Object otherProtectedClassPackageObjectInstanceField = "33";
60*795d594fSAndroid Build Coastguard Worker 
61*795d594fSAndroid Build Coastguard Worker     public static boolean otherProtectedClassPublicBooleanStaticField = true;
62*795d594fSAndroid Build Coastguard Worker     public static byte otherProtectedClassPublicByteStaticField = 34;
63*795d594fSAndroid Build Coastguard Worker     public static char otherProtectedClassPublicCharStaticField = 35;
64*795d594fSAndroid Build Coastguard Worker     public static short otherProtectedClassPublicShortStaticField = 36;
65*795d594fSAndroid Build Coastguard Worker     public static int otherProtectedClassPublicIntStaticField = 37;
66*795d594fSAndroid Build Coastguard Worker     public static long otherProtectedClassPublicLongStaticField = 38;
67*795d594fSAndroid Build Coastguard Worker     public static float otherProtectedClassPublicFloatStaticField = 39.0f;
68*795d594fSAndroid Build Coastguard Worker     public static double otherProtectedClassPublicDoubleStaticField = 40.0;
69*795d594fSAndroid Build Coastguard Worker     public static Object otherProtectedClassPublicObjectStaticField = "41";
70*795d594fSAndroid Build Coastguard Worker 
71*795d594fSAndroid Build Coastguard Worker     protected static boolean otherProtectedClassProtectedBooleanStaticField = true;
72*795d594fSAndroid Build Coastguard Worker     protected static byte otherProtectedClassProtectedByteStaticField = 42;
73*795d594fSAndroid Build Coastguard Worker     protected static char otherProtectedClassProtectedCharStaticField = 43;
74*795d594fSAndroid Build Coastguard Worker     protected static short otherProtectedClassProtectedShortStaticField = 44;
75*795d594fSAndroid Build Coastguard Worker     protected static int otherProtectedClassProtectedIntStaticField = 45;
76*795d594fSAndroid Build Coastguard Worker     protected static long otherProtectedClassProtectedLongStaticField = 46;
77*795d594fSAndroid Build Coastguard Worker     protected static float otherProtectedClassProtectedFloatStaticField = 47.0f;
78*795d594fSAndroid Build Coastguard Worker     protected static double otherProtectedClassProtectedDoubleStaticField = 48.0;
79*795d594fSAndroid Build Coastguard Worker     protected static Object otherProtectedClassProtectedObjectStaticField = "49";
80*795d594fSAndroid Build Coastguard Worker 
81*795d594fSAndroid Build Coastguard Worker     private static boolean otherProtectedClassPrivateBooleanStaticField = true;
82*795d594fSAndroid Build Coastguard Worker     private static byte otherProtectedClassPrivateByteStaticField = 50;
83*795d594fSAndroid Build Coastguard Worker     private static char otherProtectedClassPrivateCharStaticField = 51;
84*795d594fSAndroid Build Coastguard Worker     private static short otherProtectedClassPrivateShortStaticField = 52;
85*795d594fSAndroid Build Coastguard Worker     private static int otherProtectedClassPrivateIntStaticField = 53;
86*795d594fSAndroid Build Coastguard Worker     private static long otherProtectedClassPrivateLongStaticField = 54;
87*795d594fSAndroid Build Coastguard Worker     private static float otherProtectedClassPrivateFloatStaticField = 55.0f;
88*795d594fSAndroid Build Coastguard Worker     private static double otherProtectedClassPrivateDoubleStaticField = 56.0;
89*795d594fSAndroid Build Coastguard Worker     private static Object otherProtectedClassPrivateObjectStaticField = "57";
90*795d594fSAndroid Build Coastguard Worker 
91*795d594fSAndroid Build Coastguard Worker  /* package */ static boolean otherProtectedClassPackageBooleanStaticField = true;
92*795d594fSAndroid Build Coastguard Worker  /* package */ static byte otherProtectedClassPackageByteStaticField = 58;
93*795d594fSAndroid Build Coastguard Worker  /* package */ static char otherProtectedClassPackageCharStaticField = 59;
94*795d594fSAndroid Build Coastguard Worker  /* package */ static short otherProtectedClassPackageShortStaticField = 60;
95*795d594fSAndroid Build Coastguard Worker  /* package */ static int otherProtectedClassPackageIntStaticField = 61;
96*795d594fSAndroid Build Coastguard Worker  /* package */ static long otherProtectedClassPackageLongStaticField = 62;
97*795d594fSAndroid Build Coastguard Worker  /* package */ static float otherProtectedClassPackageFloatStaticField = 63.0f;
98*795d594fSAndroid Build Coastguard Worker  /* package */ static double otherProtectedClassPackageDoubleStaticField = 64.0;
99*795d594fSAndroid Build Coastguard Worker  /* package */ static Object otherProtectedClassPackageObjectStaticField = "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*795d594fSAndroid Build Coastguard Worker }
107