ConstantReflectionProvider
.
Modifier and Type | Field and Description |
---|---|
private final HotSpotMemoryAccessProviderImpl | |
protected final HotSpotMethodHandleAccessProvider | |
protected final HotSpotJVMCIRuntime |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public JavaConstant | asJavaClass(ResolvedJavaType type)
Implements jdk. Gets the runtime representation of the |
public ResolvedJavaType | asJavaType(Constant constant)
Implements jdk. Returns the |
public Constant | asObjectHub(ResolvedJavaType type)
Implements jdk. Gets the runtime representation of the "hub" of this type--that is, the closest part of the type representation which is typically stored in the object header. |
public JavaConstant | boxPrimitive(JavaConstant source)
Implements jdk. Converts the given |
public Boolean | constantEquals(Constant x, Constant y)
Implements jdk. Compares two constants for equality. |
public JavaConstant | |
public JavaConstant | forString(String value)
Implements jdk. Gets a string as a |
public MemoryAccessProvider | getMemoryAccessProvider()
Implements jdk. Gets raw memory access. |
public MethodHandleAccessProvider | getMethodHandleAccess()
Implements jdk. Gets access to the internals of |
private static boolean | Returns: true if the box is cachedCheck if the constant is a boxed value that is guaranteed to be cached by the platform. |
public JavaConstant | readArrayElement(JavaConstant array, int index)
Implements jdk. Reads a value from the given array at the given index. |
public Integer | readArrayLength(JavaConstant array)
Implements jdk. Returns the length of the array constant. |
public JavaConstant | readFieldValue(ResolvedJavaField field, JavaConstant
object from which this field's value is to be read. This value is ignored if
this field is static. receiver)Implements jdk. Gets the current value of this field for a given object, if available. |
public JavaConstant | unboxPrimitive(JavaConstant source)
Implements jdk. Converts the given |
memoryAccess | back to summary |
---|---|
private final HotSpotMemoryAccessProviderImpl memoryAccess |
methodHandleAccess | back to summary |
---|---|
protected final HotSpotMethodHandleAccessProvider methodHandleAccess |
runtime | back to summary |
---|---|
protected final HotSpotJVMCIRuntime runtime |
HotSpotConstantReflectionProvider | back to summary |
---|---|
public HotSpotConstantReflectionProvider(HotSpotJVMCIRuntime runtime) |
asJavaClass | back to summary |
---|---|
public JavaConstant asJavaClass(ResolvedJavaType type) Implements jdk. Doc from jdk. Gets the runtime representation of the
|
asJavaType | back to summary |
---|---|
public ResolvedJavaType asJavaType(Constant constant) Implements jdk. Doc from jdk. Returns the
|
asObjectHub | back to summary |
---|---|
public Constant asObjectHub(ResolvedJavaType type) Implements jdk. Doc from jdk. Gets the runtime representation of the "hub" of this type--that is, the closest part of the type representation which is typically stored in the object header.
|
boxPrimitive | back to summary |
---|---|
public JavaConstant boxPrimitive(JavaConstant source) Implements jdk. Doc from jdk. Converts the given
|
constantEquals | back to summary |
---|---|
public Boolean constantEquals(Constant x, Constant y) Implements jdk. Doc from jdk. Compares two constants for equality. The equality relationship is symmetric. Returns
|
forObject | back to summary |
---|---|
public JavaConstant forObject(Object value) |
forString | back to summary |
---|---|
public JavaConstant forString(String value) Implements jdk. Doc from jdk. Gets a string as a
|
getMemoryAccessProvider | back to summary |
---|---|
public MemoryAccessProvider getMemoryAccessProvider() Implements jdk. Doc from jdk. Gets raw memory access.
|
getMethodHandleAccess | back to summary |
---|---|
public MethodHandleAccessProvider getMethodHandleAccess() Implements jdk. Doc from jdk. Gets access to the internals of
|
isBoxCached | back to summary |
---|---|
private static boolean isBoxCached(JavaConstant source) Check if the constant is a boxed value that is guaranteed to be cached by the platform. Otherwise the generated code might be the only reference to the boxed value and since object references from nmethods are weak this can cause GC problems.
|
readArrayElement | back to summary |
---|---|
public JavaConstant readArrayElement(JavaConstant array, int index) Implements jdk. Doc from jdk. Reads a value from the given array at the given index. Returns
|
readArrayLength | back to summary |
---|---|
public Integer readArrayLength(JavaConstant array) Implements jdk. Doc from jdk. Returns the length of the array constant. Returns
|
readFieldValue | back to summary |
---|---|
public JavaConstant readFieldValue(ResolvedJavaField field, JavaConstant receiver) Implements jdk. Doc from jdk. Gets the current value of this field for a given object, if available. There is no guarantee that the same value will be returned by this method for a field unless the field is considered to be constant by the runtime.
|
unboxPrimitive | back to summary |
---|---|
public JavaConstant unboxPrimitive(JavaConstant source) Implements jdk. Doc from jdk. Converts the given
|