blob: fa25d58e43b8304b0b3e0751ea6245d02d1b6e69 [file] [log] [blame]
Aart Bikc2bc2652016-05-23 14:58:49 -07001/*
2 * Copyright (C) 2016 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
Aart Bikc2bc2652016-05-23 14:58:49 -070017public class Main {
18
Aart Bik14154132016-06-02 17:53:58 -070019 public static final String staticFinalField = null;
20
21 private static String staticPrivateField = null;
22
Aart Bik31883642016-06-06 15:02:44 -070023 private int privateField = 0;
24
Aart Bik296fbb42016-06-07 13:49:12 -070025 private void privateMethod() { }
26
Aart Bik14154132016-06-02 17:53:58 -070027 private static void test(String name) throws Exception {
28 try {
29 Class<?> a = Class.forName(name);
30 a.newInstance();
31 } catch (java.lang.LinkageError e) {
32 System.out.println("passed " + name);
33 }
34 }
Aart Bikc2bc2652016-05-23 14:58:49 -070035
36 public static void main(String[] args) throws Exception {
Aart Bik14154132016-06-02 17:53:58 -070037 test("A");
38 test("B");
39 test("C");
Aart Bik31883642016-06-06 15:02:44 -070040 test("D");
Aart Bik2a1b7ac2016-06-29 14:54:26 -070041 test("E");
Aart Bikc2bc2652016-05-23 14:58:49 -070042 }
43}