Constant_Dynamic_info
.)
Concrete subtypes of DynamicConstantDesc should be immutable and their behavior should not rely on object identity.
Modifier and Type | Class and Description |
---|---|
private static class | |
private static class |
Modifier and Type | Field and Description |
---|---|
private final ConstantDesc[] | |
private final DirectMethodHandleDesc | |
private final String | |
private final ClassDesc |
Access | Constructor and Description |
---|---|
protected | DynamicConstantDesc(DirectMethodHandleDesc
a bootstrapMethod, String DirectMethodHandleDesc describing the
bootstrap method for the constantThe unqualified name that would appear in the constantName, ClassDesc NameAndType
operand of the LDC for this constanta constantType, ConstantDesc... ClassDesc describing the type
that would appear in the NameAndType operand
of the LDC for this constantConstantDesc s describing the static arguments
to the bootstrap, that would appear in the
BootstrapMethods attributeCreates a nominal descriptor for a dynamic constant. |
Modifier and Type | Method and Description |
---|---|
public ConstantDesc[] | |
public List | Returns: aList of the bootstrap argumentsReturns the bootstrap arguments for this constant as an immutable |
public DirectMethodHandleDesc | Returns: the bootstrap methodReturns a |
private static ConstantDesc | |
private static ConstantDesc | |
private static ConstantDesc | |
private static ConstantDesc | |
private static ConstantDesc | |
private static ConstantDesc | |
public String | Returns: the constant nameReturns the name that would appear in the |
public ClassDesc | Returns: the constant typeReturns a |
public final boolean | Returns: true if the specified DynamicConstantDesc
is equal to this DynamicConstantDesc .the o)DynamicConstantDesc to compare to this
DynamicConstantDesc Overrides java. Compares the specified object with this descriptor for equality. |
public final int | |
public static < the type of the dynamic constant T> DynamicConstantDesc | Returns: the nominal descriptora bootstrapMethod, ConstantDesc... DirectMethodHandleDesc describing the
bootstrap method for the constantConstantDesc s describing the static arguments
to the bootstrap, that would appear in the
BootstrapMethods attributeReturns a nominal descriptor for a dynamic constant whose name parameter
is |
public static < the type of the dynamic constant T> DynamicConstantDesc | Returns: the nominal descriptora bootstrapMethod)DirectMethodHandleDesc describing the
bootstrap method for the constantReturns a nominal descriptor for a dynamic constant whose bootstrap has
no static arguments, whose name parameter is |
public static < the type of the dynamic constant T> ConstantDesc | Returns: the nominal descriptora bootstrapMethod, String DirectMethodHandleDesc describing the
bootstrap method for the constantThe unqualified name that would appear in the constantName, ClassDesc NameAndType
operand of the LDC for this constanta constantType, ConstantDesc[] ClassDesc describing the type
that would appear in the NameAndType operand
of the LDC for this constantConstantDesc s describing the static arguments
to the bootstrap, that would appear in the
BootstrapMethods attributeReturns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available. |
public static < the type of the dynamic constant T> DynamicConstantDesc | Returns: the nominal descriptora bootstrapMethod, String DirectMethodHandleDesc describing the
bootstrap method for the constantThe unqualified name that would appear in the constantName, ClassDesc NameAndType
operand of the LDC for this constanta constantType, ConstantDesc... ClassDesc describing the type
that would appear in the NameAndType operand
of the LDC for this constantConstantDesc s describing the static arguments
to the bootstrap, that would appear in the
BootstrapMethods attributeReturns a nominal descriptor for a dynamic constant. |
public T | resolveConstantDesc(MethodHandles.
The lookupMethodHandles. to provide name resolution
and access control contextImplements java. Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4. |
public String | Returns: A compact textual description of this call site descriptorOverrides java. Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments. |
private ConstantDesc |
bootstrapArgs | back to summary |
---|---|
private final ConstantDesc[] bootstrapArgs |
bootstrapMethod | back to summary |
---|---|
private final DirectMethodHandleDesc bootstrapMethod |
constantName | back to summary |
---|---|
private final String constantName |
constantType | back to summary |
---|---|
private final ClassDesc constantType |
DynamicConstantDesc | back to summary |
---|---|
protected DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) Creates a nominal descriptor for a dynamic constant.
|
bootstrapArgs | back to summary |
---|---|
public ConstantDesc[] bootstrapArgs() Returns the bootstrap arguments for this constant.
|
bootstrapArgsList | back to summary |
---|---|
public List Returns the bootstrap arguments for this constant as an immutable
|
bootstrapMethod | back to summary |
---|---|
public DirectMethodHandleDesc bootstrapMethod() Returns a
|
canonicalizeArrayVarHandle | back to summary |
---|---|
private static ConstantDesc canonicalizeArrayVarHandle(DynamicConstantDesc<?> desc) |
canonicalizeEnum | back to summary |
---|---|
private static ConstantDesc canonicalizeEnum(DynamicConstantDesc<?> desc) |
canonicalizeFieldVarHandle | back to summary |
---|---|
private static ConstantDesc canonicalizeFieldVarHandle(DynamicConstantDesc<?> desc) |
canonicalizeNull | back to summary |
---|---|
private static ConstantDesc canonicalizeNull(DynamicConstantDesc<?> desc) |
canonicalizePrimitiveClass | back to summary |
---|---|
private static ConstantDesc canonicalizePrimitiveClass(DynamicConstantDesc<?> desc) |
canonicalizeStaticFieldVarHandle | back to summary |
---|---|
private static ConstantDesc canonicalizeStaticFieldVarHandle(DynamicConstantDesc<?> desc) |
constantName | back to summary |
---|---|
public String constantName() Returns the name that would appear in the
|
constantType | back to summary |
---|---|
public ClassDesc constantType() Returns a
|
equals | back to summary |
---|---|
public final boolean equals(Object o) Overrides java. Compares the specified object with this descriptor for equality. Returns
|
hashCode | back to summary |
---|---|
public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
of | back to summary |
---|---|
public static <T> DynamicConstantDesc Returns a nominal descriptor for a dynamic constant whose name parameter
is
|
of | back to summary |
---|---|
public static <T> DynamicConstantDesc Returns a nominal descriptor for a dynamic constant whose bootstrap has
no static arguments, whose name parameter is
|
ofCanonical | back to summary |
---|---|
public static <T> ConstantDesc ofCanonical(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs) Returns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available. Classes whose Bytecode-reading APIs that process the constant pool and wish to expose
entries as
|
ofNamed | back to summary |
---|---|
public static <T> DynamicConstantDesc Returns a nominal descriptor for a dynamic constant.
|
resolveConstantDesc | back to summary |
---|---|
public T resolveConstantDesc(MethodHandles. Implements java. Doc from java. Resolves this descriptor reflectively, emulating the resolution behavior
of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4. The resolution
and access control context is provided by the
|
toString | back to summary |
---|---|
public String toString() Overrides java. Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments. |
tryCanonicalize | back to summary |
---|---|
private ConstantDesc tryCanonicalize() |
Access | Constructor and Description |
---|---|
pack-priv | AnonymousDynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)
|
AnonymousDynamicConstantDesc | back to summary |
---|---|
pack-priv AnonymousDynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) |
Modifier and Type | Field and Description |
---|---|
pack-priv static final Map |
Access | Constructor and Description |
---|---|
private |
CANONICAL_MAP | back to summary |
---|---|
pack-priv static final Map<MethodHandleDesc, Function<DynamicConstantDesc<?>, ConstantDesc>> CANONICAL_MAP |
CanonicalMapHolder | back to summary |
---|---|
private CanonicalMapHolder() |