5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.runtime.test;
24
25 import static java.lang.reflect.Modifier.isFinal;
26 import static java.lang.reflect.Modifier.isStatic;
27
28 import java.io.Serializable;
29 import java.lang.reflect.Array;
30 import java.lang.reflect.Field;
31 import java.lang.reflect.Method;
32 import java.util.AbstractCollection;
33 import java.util.AbstractList;
34 import java.util.ArrayDeque;
35 import java.util.ArrayList;
36 import java.util.Collection;
37 import java.util.Collections;
38 import java.util.HashMap;
39 import java.util.HashSet;
40 import java.util.IdentityHashMap;
41 import java.util.LinkedHashMap;
42 import java.util.LinkedList;
43 import java.util.List;
44 import java.util.Map;
45 import java.util.Queue;
46 import java.util.Set;
47 import java.util.TreeMap;
48 import java.util.stream.Collectors;
49
50 import jdk.vm.ci.meta.ConstantReflectionProvider;
51 import jdk.vm.ci.meta.JavaConstant;
52 import jdk.vm.ci.meta.MetaAccessProvider;
53 import jdk.vm.ci.meta.ResolvedJavaField;
54 import jdk.vm.ci.meta.ResolvedJavaType;
55 import jdk.vm.ci.runtime.JVMCI;
56
57 import org.junit.Test;
58
59 import jdk.internal.misc.Unsafe;
60
61 /**
62 * Context for type related tests.
63 */
64 public class TypeUniverse {
65
66 public static final Unsafe unsafe;
67 public static final double JAVA_VERSION = Double.valueOf(System.getProperty("java.specification.version"));
68
69 public static final MetaAccessProvider metaAccess = JVMCI.getRuntime().getHostJVMCIBackend().getMetaAccess();
70 public static final ConstantReflectionProvider constantReflection = JVMCI.getRuntime().getHostJVMCIBackend().getConstantReflection();
71 public static final Collection<Class<?>> classes = new HashSet<>();
72 public static final Set<ResolvedJavaType> javaTypes;
73 public static final Map<Class<?>, Class<?>> arrayClasses = new HashMap<>();
74
75 private static List<ConstantValue> constants;
76
77 public class InnerClass {
78
79 }
80
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package jdk.vm.ci.runtime.test;
24
25 import jdk.internal.misc.Unsafe;
26 import jdk.vm.ci.meta.ConstantReflectionProvider;
27 import jdk.vm.ci.meta.JavaConstant;
28 import jdk.vm.ci.meta.MetaAccessProvider;
29 import jdk.vm.ci.meta.ResolvedJavaField;
30 import jdk.vm.ci.meta.ResolvedJavaType;
31 import jdk.vm.ci.runtime.JVMCI;
32 import org.junit.Test;
33
34 import java.io.Serializable;
35 import java.lang.reflect.Array;
36 import java.lang.reflect.Field;
37 import java.lang.reflect.Method;
38 import java.util.AbstractCollection;
39 import java.util.AbstractList;
40 import java.util.ArrayDeque;
41 import java.util.ArrayList;
42 import java.util.Collection;
43 import java.util.Collections;
44 import java.util.HashMap;
45 import java.util.HashSet;
46 import java.util.IdentityHashMap;
47 import java.util.LinkedHashMap;
48 import java.util.LinkedList;
49 import java.util.List;
50 import java.util.Map;
51 import java.util.Queue;
52 import java.util.Set;
53 import java.util.TreeMap;
54 import java.util.stream.Collectors;
55
56 import static java.lang.reflect.Modifier.isFinal;
57 import static java.lang.reflect.Modifier.isStatic;
58
59 /**
60 * Context for type related tests.
61 */
62 public class TypeUniverse {
63
64 public static final Unsafe unsafe;
65 public static final double JAVA_VERSION = Double.valueOf(System.getProperty("java.specification.version"));
66
67 public static final MetaAccessProvider metaAccess = JVMCI.getRuntime().getHostJVMCIBackend().getMetaAccess();
68 public static final ConstantReflectionProvider constantReflection = JVMCI.getRuntime().getHostJVMCIBackend().getConstantReflection();
69 public static final Collection<Class<?>> classes = new HashSet<>();
70 public static final Set<ResolvedJavaType> javaTypes;
71 public static final Map<Class<?>, Class<?>> arrayClasses = new HashMap<>();
72
73 private static List<ConstantValue> constants;
74
75 public class InnerClass {
76
77 }
78
|