Package org.springframework.asm
Class ConstantDynamic
java.lang.Object
org.springframework.asm.ConstantDynamic
A constant whose value is computed at runtime, with a bootstrap method.
- Author:
- Remi Forax
- 
Constructor SummaryConstructorsConstructorDescriptionConstantDynamic(String name, String descriptor, Handle bootstrapMethod, Object... bootstrapMethodArguments) Constructs a newConstantDynamic.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns the bootstrap method used to compute the value of this constant.getBootstrapMethodArgument(int index) Returns an argument passed to the bootstrap method, in order to compute the value of this constant.intReturns the number of arguments passed to the bootstrap method, in order to compute the value of this constant.Returns the type of this constant.getName()Returns the name of this constant.intgetSize()Returns the size of this constant.inthashCode()toString()
- 
Constructor Details- 
ConstantDynamicpublic ConstantDynamic(String name, String descriptor, Handle bootstrapMethod, Object... bootstrapMethodArguments) Constructs a newConstantDynamic.- Parameters:
- 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.
 
 
- 
- 
Method Details- 
getNameReturns the name of this constant.- Returns:
- the name of this constant.
 
- 
getDescriptorReturns the type of this constant.- Returns:
- the type of this constant, as a field descriptor.
 
- 
getBootstrapMethodReturns the bootstrap method used to compute the value of this constant.- Returns:
- the bootstrap method used to compute the value of this constant.
 
- 
getBootstrapMethodArgumentCountpublic int getBootstrapMethodArgumentCount()Returns the number of arguments passed to the bootstrap method, in order to compute the value of this constant.- Returns:
- the number of arguments passed to the bootstrap method, in order to compute the value of this constant.
 
- 
getBootstrapMethodArgumentReturns an argument passed to the bootstrap method, in order to compute the value of this constant.- Parameters:
- index- an argument index, between 0 and- getBootstrapMethodArgumentCount()(exclusive).
- Returns:
- the argument passed to the bootstrap method, with the given index.
 
- 
getSizepublic int getSize()Returns the size of this constant.- Returns:
- the size of this constant, i.e., 2 for longanddouble, 1 otherwise.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-