public interface HotSpotResolvedObjectType extends ResolvedJavaType
JavaType for resolved non-primitive HotSpot classes.ANNOTATION, BRIDGE, ENUM, MANDATED, SYNTHETIC, VARARGS| Modifier and Type | Method and Description |
|---|---|
HotSpotResolvedObjectType |
asExactType()
Returns this type if it is an exact type otherwise returns null.
|
ConstantPool |
constantPool() |
ResolvedJavaField |
createField(String name,
JavaType type,
long offset,
int modifiers) |
Assumptions.AssumptionResult<ResolvedJavaType> |
findLeafConcreteSubtype()
Attempts to get a leaf concrete subclass of this type.
|
HotSpotResolvedObjectType |
findLeastCommonAncestor(ResolvedJavaType otherType)
Walks the class hierarchy upwards and returns the least common class that is a superclass of
both the current and the given type.
|
Assumptions.AssumptionResult<ResolvedJavaMethod> |
findUniqueConcreteMethod(ResolvedJavaMethod method)
Given a
ResolvedJavaMethod A, returns a concrete ResolvedJavaMethod B that is
the only possible unique target for a virtual call on A(). |
HotSpotResolvedObjectType |
getArrayClass()
Gets the array class type representing an array with elements of this type.
|
ResolvedJavaMethod |
getClassInitializer()
Returns the
<clinit> method for this class if there is one. |
ResolvedJavaType |
getComponentType()
For array types, gets the type of the components, or
null if this is not an array
type. |
HotSpotResolvedObjectType |
getEnclosingType()
Returns the enclosing type of this type, if it exists, or
null. |
HotSpotResolvedObjectType[] |
getInterfaces()
Gets the interfaces implemented or extended by this type.
|
default Kind |
getKind()
Gets the kind of this type.
|
HotSpotResolvedObjectType |
getSuperclass()
Gets the super class of this type.
|
HotSpotResolvedObjectType |
getSupertype() |
int |
getVtableLength() |
int |
instanceSize()
Gets the instance size of this type.
|
boolean |
isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass)
Performs a fast-path check that this type is resolved in the context of a given accessing
class.
|
boolean |
isPrimaryType() |
default boolean |
isPrimitive()
Checks whether this type is primitive.
|
Constant |
klass()
Gets the metaspace Klass boxed in a
JavaConstant. |
int |
layoutHelper() |
long |
prototypeMarkWord() |
int |
superCheckOffset() |
findInstanceFieldWithOffset, findMethod, getAnnotation, getClassFilePath, getDeclaredConstructors, getDeclaredMethods, getElementalType, getInstanceFields, getJavaClass, getModifiers, getObjectHub, getSingleImplementor, getSourceFileName, getStaticFields, hasFinalizableSubclass, hasFinalizer, initialize, isArray, isAssignableFrom, isInitialized, isInstance, isInstanceClass, isInterface, isJavaLangObject, isLeaf, isLinked, isLocal, isMember, isTrustedInterfaceType, resolveConcreteMethod, resolveMethodgetName, getUnqualifiedName, resolve, toClassName, toJavaName, toJavaNameisAbstract, isConcrete, isFinalFlagSet, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, jvmClassModifiers, jvmFieldModifiers, jvmMethodModifiersHotSpotResolvedObjectType getArrayClass()
JavaTypegetArrayClass in interface JavaTypegetArrayClass in interface ResolvedJavaTypeResolvedJavaType getComponentType()
JavaTypenull if this is not an array
type. This method is analogous to Class.getComponentType().getComponentType in interface JavaTypegetComponentType in interface ResolvedJavaTypeAssumptions.AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype()
ResolvedJavaType
For an array type A, the leaf concrete subclass is A if the
elemental type of A is final (which includes primitive
types). Otherwise null is returned for A.
For a non-array type T, the result is the leaf concrete type in the current hierarchy of T.
A runtime may decide not to manage or walk a large hierarchy and so the result is conservative. That is, a non-null result is guaranteed to be the leaf concrete class in T's hierarchy at the current point in time but a null result does not necessarily imply that there is no leaf concrete class in T's hierarchy.
If the compiler uses the result of this method for its compilation, it must register the
Assumptions.AssumptionResult in its Assumptions because dynamic class loading can
invalidate the result of this method.
findLeafConcreteSubtype in interface ResolvedJavaTypeAssumptions.AssumptionResult containing the leaf concrete subclass for this type as
described aboveHotSpotResolvedObjectType getSuperclass()
ResolvedJavaTypeObject class,
an interface, a primitive type, or void, then null is returned. If this object represents an
array class then the type object representing the Object class is returned.getSuperclass in interface ResolvedJavaTypeHotSpotResolvedObjectType[] getInterfaces()
ResolvedJavaTypeClass.getInterfaces() and as such, only returns the interfaces directly implemented
or extended by this type.getInterfaces in interface ResolvedJavaTypeHotSpotResolvedObjectType getSupertype()
HotSpotResolvedObjectType findLeastCommonAncestor(ResolvedJavaType otherType)
ResolvedJavaTypefindLeastCommonAncestor in interface ResolvedJavaTypenull if primitive types are involved.HotSpotResolvedObjectType asExactType()
ResolvedJavaTypeasExactType in interface ResolvedJavaTypenull otherwisedefault boolean isPrimitive()
ResolvedJavaTypeisPrimitive in interface ResolvedJavaTypetrue if this type is primitivedefault Kind getKind()
JavaTypeConstantPool constantPool()
int instanceSize()
int getVtableLength()
Assumptions.AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method)
ResolvedJavaTypeResolvedJavaMethod A, returns a concrete ResolvedJavaMethod B that is
the only possible unique target for a virtual call on A(). Returns null if either no
such concrete method or more than one such method exists. Returns the method A if A is a
concrete method that is not overridden.
If the compiler uses the result of this method for its compilation, it must register an assumption because dynamic class loading can invalidate the result of this method.
findUniqueConcreteMethod in interface ResolvedJavaTypemethod - the method A for which a unique concrete target is searchednull if no such target exists or assumptions
are not supported by this runtimeboolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass)
accessingClass. That can only be determined by
re-resolving the type.Constant klass()
JavaConstant.boolean isPrimaryType()
int superCheckOffset()
long prototypeMarkWord()
int layoutHelper()
HotSpotResolvedObjectType getEnclosingType()
ResolvedJavaTypenull.getEnclosingType in interface ResolvedJavaTypeResolvedJavaMethod getClassInitializer()
ResolvedJavaType<clinit> method for this class if there is one.getClassInitializer in interface ResolvedJavaTypeResolvedJavaField createField(String name, JavaType type, long offset, int modifiers)