/*
 * 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() { }

}
