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.hotspot; 24 25 import static java.util.Objects.*; 26 27 import java.lang.annotation.*; 28 import java.lang.reflect.*; 29 import java.net.*; 30 31 import jdk.vm.ci.common.*; 32 import jdk.vm.ci.meta.*; 33 import jdk.vm.ci.meta.Assumptions.AssumptionResult; 34 35 /** 36 * Implementation of {@link JavaType} for primitive HotSpot types. 37 */ 38 public final class HotSpotResolvedPrimitiveType extends HotSpotResolvedJavaType implements HotSpotProxified { 39 40 private final JavaKind kind; 41 42 /** 43 * Creates the JVMCI mirror for a primitive {@link JavaKind}. 44 * 45 * <p> 46 * <b>NOTE</b>: Creating an instance of this class does not install the mirror for the 47 * {@link Class} type. Use {@link HotSpotJVMCIRuntimeProvider#fromClass(Class)} instead. 48 * </p> 49 * 50 * @param kind the Kind to create the mirror for 51 */ 52 public HotSpotResolvedPrimitiveType(JavaKind kind) { 53 super(String.valueOf(Character.toUpperCase(kind.getTypeChar()))); | 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.hotspot; 24 25 import static java.util.Objects.requireNonNull; 26 27 import java.lang.annotation.Annotation; 28 import java.lang.reflect.Array; 29 import java.lang.reflect.Modifier; 30 import java.net.URL; 31 32 import jdk.vm.ci.common.JVMCIError; 33 import jdk.vm.ci.meta.Assumptions.AssumptionResult; 34 import jdk.vm.ci.meta.JavaConstant; 35 import jdk.vm.ci.meta.JavaKind; 36 import jdk.vm.ci.meta.JavaType; 37 import jdk.vm.ci.meta.ResolvedJavaField; 38 import jdk.vm.ci.meta.ResolvedJavaMethod; 39 import jdk.vm.ci.meta.ResolvedJavaType; 40 41 /** 42 * Implementation of {@link JavaType} for primitive HotSpot types. 43 */ 44 public final class HotSpotResolvedPrimitiveType extends HotSpotResolvedJavaType implements HotSpotProxified { 45 46 private final JavaKind kind; 47 48 /** 49 * Creates the JVMCI mirror for a primitive {@link JavaKind}. 50 * 51 * <p> 52 * <b>NOTE</b>: Creating an instance of this class does not install the mirror for the 53 * {@link Class} type. Use {@link HotSpotJVMCIRuntimeProvider#fromClass(Class)} instead. 54 * </p> 55 * 56 * @param kind the Kind to create the mirror for 57 */ 58 public HotSpotResolvedPrimitiveType(JavaKind kind) { 59 super(String.valueOf(Character.toUpperCase(kind.getTypeChar()))); |