Java程序  |  107行  |  6.05 KB

/*
 * Copyright (C) 2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package other;

// Class that cannot be accessed outside of this package.
class ProtectedClass {
    public boolean otherProtectedClassPublicBooleanInstanceField = true;
    public byte otherProtectedClassPublicByteInstanceField = 2;
    public char otherProtectedClassPublicCharInstanceField = 3;
    public short otherProtectedClassPublicShortInstanceField = 4;
    public int otherProtectedClassPublicIntInstanceField = 5;
    public long otherProtectedClassPublicLongInstanceField = 6;
    public float otherProtectedClassPublicFloatInstanceField = 7.0f;
    public double otherProtectedClassPublicDoubleInstanceField = 8.0;
    public Object otherProtectedClassPublicObjectInstanceField = "9";

    protected boolean otherProtectedClassProtectedBooleanInstanceField = true;
    protected byte otherProtectedClassProtectedByteInstanceField = 10;
    protected char otherProtectedClassProtectedCharInstanceField = 11;
    protected short otherProtectedClassProtectedShortInstanceField = 12;
    protected int otherProtectedClassProtectedIntInstanceField = 13;
    protected long otherProtectedClassProtectedLongInstanceField = 14;
    protected float otherProtectedClassProtectedFloatInstanceField = 15.0f;
    protected double otherProtectedClassProtectedDoubleInstanceField = 16.0;
    protected Object otherProtectedClassProtectedObjectInstanceField = "17";

    private boolean otherProtectedClassPrivateBooleanInstanceField = true;
    private byte otherProtectedClassPrivateByteInstanceField = 18;
    private char otherProtectedClassPrivateCharInstanceField = 19;
    private short otherProtectedClassPrivateShortInstanceField = 20;
    private int otherProtectedClassPrivateIntInstanceField = 21;
    private long otherProtectedClassPrivateLongInstanceField = 22;
    private float otherProtectedClassPrivateFloatInstanceField = 23.0f;
    private double otherProtectedClassPrivateDoubleInstanceField = 24.0;
    private Object otherProtectedClassPrivateObjectInstanceField = "25";

 /* package */ boolean otherProtectedClassPackageBooleanInstanceField = true;
 /* package */ byte otherProtectedClassPackageByteInstanceField = 26;
 /* package */ char otherProtectedClassPackageCharInstanceField = 27;
 /* package */ short otherProtectedClassPackageShortInstanceField = 28;
 /* package */ int otherProtectedClassPackageIntInstanceField = 29;
 /* package */ long otherProtectedClassPackageLongInstanceField = 30;
 /* package */ float otherProtectedClassPackageFloatInstanceField = 31.0f;
 /* package */ double otherProtectedClassPackageDoubleInstanceField = 32.0;
 /* package */ Object otherProtectedClassPackageObjectInstanceField = "33";

    public static boolean otherProtectedClassPublicBooleanStaticField = true;
    public static byte otherProtectedClassPublicByteStaticField = 34;
    public static char otherProtectedClassPublicCharStaticField = 35;
    public static short otherProtectedClassPublicShortStaticField = 36;
    public static int otherProtectedClassPublicIntStaticField = 37;
    public static long otherProtectedClassPublicLongStaticField = 38;
    public static float otherProtectedClassPublicFloatStaticField = 39.0f;
    public static double otherProtectedClassPublicDoubleStaticField = 40.0;
    public static Object otherProtectedClassPublicObjectStaticField = "41";

    protected static boolean otherProtectedClassProtectedBooleanStaticField = true;
    protected static byte otherProtectedClassProtectedByteStaticField = 42;
    protected static char otherProtectedClassProtectedCharStaticField = 43;
    protected static short otherProtectedClassProtectedShortStaticField = 44;
    protected static int otherProtectedClassProtectedIntStaticField = 45;
    protected static long otherProtectedClassProtectedLongStaticField = 46;
    protected static float otherProtectedClassProtectedFloatStaticField = 47.0f;
    protected static double otherProtectedClassProtectedDoubleStaticField = 48.0;
    protected static Object otherProtectedClassProtectedObjectStaticField = "49";

    private static boolean otherProtectedClassPrivateBooleanStaticField = true;
    private static byte otherProtectedClassPrivateByteStaticField = 50;
    private static char otherProtectedClassPrivateCharStaticField = 51;
    private static short otherProtectedClassPrivateShortStaticField = 52;
    private static int otherProtectedClassPrivateIntStaticField = 53;
    private static long otherProtectedClassPrivateLongStaticField = 54;
    private static float otherProtectedClassPrivateFloatStaticField = 55.0f;
    private static double otherProtectedClassPrivateDoubleStaticField = 56.0;
    private static Object otherProtectedClassPrivateObjectStaticField = "57";

 /* package */ static boolean otherProtectedClassPackageBooleanStaticField = true;
 /* package */ static byte otherProtectedClassPackageByteStaticField = 58;
 /* package */ static char otherProtectedClassPackageCharStaticField = 59;
 /* package */ static short otherProtectedClassPackageShortStaticField = 60;
 /* package */ static int otherProtectedClassPackageIntStaticField = 61;
 /* package */ static long otherProtectedClassPackageLongStaticField = 62;
 /* package */ static float otherProtectedClassPackageFloatStaticField = 63.0f;
 /* package */ static double otherProtectedClassPackageDoubleStaticField = 64.0;
 /* package */ static Object otherProtectedClassPackageObjectStaticField = "65";

    public void otherPublicMethod() { }
    protected void otherProtectedMethod() { }
    private void otherPrivateMethod() { }
    /* package */ void otherPackageMethod() { }

}