public final class ConstantDynamic
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Handle |
bootstrapMethod
The bootstrap method to use to compute the constant value at runtime.
|
private java.lang.Object[] |
bootstrapMethodArguments
The arguments to pass to the bootstrap method, in order to compute the constant value at
runtime.
|
private java.lang.String |
descriptor
The constant type (must be a field descriptor).
|
private java.lang.String |
name
The constant name (can be arbitrary).
|
Constructor and Description |
---|
ConstantDynamic(java.lang.String name,
java.lang.String descriptor,
Handle bootstrapMethod,
java.lang.Object... bootstrapMethodArguments)
Constructs a new
ConstantDynamic . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
Handle |
getBootstrapMethod()
Returns the bootstrap method used to compute the value of this constant.
|
java.lang.Object |
getBootstrapMethodArgument(int index)
Returns an argument passed to the bootstrap method, in order to compute the value of this
constant.
|
int |
getBootstrapMethodArgumentCount()
Returns the number of arguments passed to the bootstrap method, in order to compute the value
of this constant.
|
(package private) java.lang.Object[] |
getBootstrapMethodArgumentsUnsafe()
Returns the arguments to pass to the bootstrap method, in order to compute the value of this
constant.
|
java.lang.String |
getDescriptor()
Returns the type of this constant.
|
java.lang.String |
getName()
Returns the name of this constant.
|
int |
getSize()
Returns the size of this constant.
|
int |
hashCode() |
java.lang.String |
toString() |
private final java.lang.String name
private final java.lang.String descriptor
private final Handle bootstrapMethod
private final java.lang.Object[] bootstrapMethodArguments
public ConstantDynamic(java.lang.String name, java.lang.String descriptor, Handle bootstrapMethod, java.lang.Object... bootstrapMethodArguments)
ConstantDynamic
.name
- the constant name (can be arbitrary).descriptor
- the constant type (must be a field descriptor).bootstrapMethod
- the bootstrap method to use to compute the constant value at runtime.bootstrapMethodArguments
- the arguments to pass to the bootstrap method, in order to
compute the constant value at runtime.public java.lang.String getName()
public java.lang.String getDescriptor()
public Handle getBootstrapMethod()
public int getBootstrapMethodArgumentCount()
public java.lang.Object getBootstrapMethodArgument(int index)
index
- an argument index, between 0 and getBootstrapMethodArgumentCount()
(exclusive).java.lang.Object[] getBootstrapMethodArgumentsUnsafe()
public int getSize()
long
and double
, 1 otherwise.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object