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 jdk.vm.ci.meta.*; 26 import jdk.vm.ci.meta.Assumptions.*; 27 28 /** 29 * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. 30 */ 31 public interface HotSpotResolvedObjectType extends ResolvedJavaType { 32 33 HotSpotResolvedObjectType getArrayClass(); 34 35 ResolvedJavaType getComponentType(); 36 37 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); 38 39 HotSpotResolvedObjectType getSuperclass(); 40 41 HotSpotResolvedObjectType[] getInterfaces(); 42 43 HotSpotResolvedObjectType getSupertype(); 44 45 HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType); 46 47 HotSpotResolvedObjectType asExactType(); 48 49 default boolean isPrimitive() { 50 return false; 51 } 52 | 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 jdk.vm.ci.meta.Assumptions.AssumptionResult; 26 import jdk.vm.ci.meta.Constant; 27 import jdk.vm.ci.meta.ConstantPool; 28 import jdk.vm.ci.meta.JavaConstant; 29 import jdk.vm.ci.meta.JavaKind; 30 import jdk.vm.ci.meta.JavaType; 31 import jdk.vm.ci.meta.ResolvedJavaField; 32 import jdk.vm.ci.meta.ResolvedJavaMethod; 33 import jdk.vm.ci.meta.ResolvedJavaType; 34 35 /** 36 * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. 37 */ 38 public interface HotSpotResolvedObjectType extends ResolvedJavaType { 39 40 /** 41 * Gets the JVMCI mirror for a {@link Class} object. 42 * 43 * @return the {@link HotSpotResolvedJavaType} corresponding to {@code javaClass} 44 */ 45 static HotSpotResolvedObjectType fromObjectClass(Class<?> javaClass) { 46 return HotSpotResolvedObjectTypeImpl.fromObjectClass(javaClass); 47 } 48 49 HotSpotResolvedObjectType getArrayClass(); 50 51 ResolvedJavaType getComponentType(); 52 53 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); 54 55 HotSpotResolvedObjectType getSuperclass(); 56 57 HotSpotResolvedObjectType[] getInterfaces(); 58 59 HotSpotResolvedObjectType getSupertype(); 60 61 HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType); 62 63 HotSpotResolvedObjectType asExactType(); 64 65 default boolean isPrimitive() { 66 return false; 67 } 68 |