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.*; 26 27 import java.io.*; 28 import java.lang.reflect.*; 29 import java.util.*; 30 import java.util.Queue; 31 import java.util.stream.*; 32 33 import jdk.vm.ci.meta.*; 34 import jdk.vm.ci.runtime.*; 35 36 import org.junit.*; 37 38 import sun.misc.*; 39 40 //JaCoCo Exclude 41 42 /** 43 * Context for type related tests. 44 */ 45 public class TypeUniverse { 46 47 public static final Unsafe unsafe; 48 public static final double JAVA_VERSION = Double.valueOf(System.getProperty("java.specification.version")); 49 50 public static final MetaAccessProvider metaAccess = JVMCI.getRuntime().getHostJVMCIBackend().getMetaAccess(); 51 public static final ConstantReflectionProvider constantReflection = JVMCI.getRuntime().getHostJVMCIBackend().getConstantReflection(); 52 public static final Collection<Class<?>> classes = new HashSet<>(); 53 public static final Set<ResolvedJavaType> javaTypes; 54 public static final Map<Class<?>, Class<?>> arrayClasses = new HashMap<>(); 55 56 private static List<ConstantValue> constants; 57 58 public class InnerClass { | 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.JavaField; 53 import jdk.vm.ci.meta.MetaAccessProvider; 54 import jdk.vm.ci.meta.ResolvedJavaType; 55 import jdk.vm.ci.meta.TrustedInterface; 56 import jdk.vm.ci.runtime.JVMCI; 57 58 import org.junit.Test; 59 60 import sun.misc.Unsafe; 61 62 //JaCoCo Exclude 63 64 /** 65 * Context for type related tests. 66 */ 67 public class TypeUniverse { 68 69 public static final Unsafe unsafe; 70 public static final double JAVA_VERSION = Double.valueOf(System.getProperty("java.specification.version")); 71 72 public static final MetaAccessProvider metaAccess = JVMCI.getRuntime().getHostJVMCIBackend().getMetaAccess(); 73 public static final ConstantReflectionProvider constantReflection = JVMCI.getRuntime().getHostJVMCIBackend().getConstantReflection(); 74 public static final Collection<Class<?>> classes = new HashSet<>(); 75 public static final Set<ResolvedJavaType> javaTypes; 76 public static final Map<Class<?>, Class<?>> arrayClasses = new HashMap<>(); 77 78 private static List<ConstantValue> constants; 79 80 public class InnerClass { |