java.lang.Object
java.lang.constant.ConstantDescs
Predefined values of nominal descriptor
for common constants, including descriptors for primitive class types and
other common platform types, and descriptors for method handles for standard
bootstrap methods.
- Since:
- 12
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final DirectMethodHandleDesc
MethodHandleDesc
representingMethodHandles.classData
static final DirectMethodHandleDesc
MethodHandleDesc
representingMethodHandles.classDataAt
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.enumConstant
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.explicitCast
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.getStaticFinal
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.invoke
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.nullConstant
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.primitiveClass
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.arrayVarHandle
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.fieldVarHandle
static final DirectMethodHandleDesc
MethodHandleDesc
representingConstantBootstraps.staticFieldVarHandle
static final ClassDesc
ClassDesc
representing the primitive typeboolean
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typebyte
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typechar
static final ClassDesc
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representingCollection
static final ClassDesc
ClassDesc
representingConstantBootstraps
static final ClassDesc
ClassDesc
representingConstantDesc
static final ClassDesc
ClassDesc
representingDirectMethodHandleDesc
static final ClassDesc
ClassDesc
representing the primitive typedouble
static final ClassDesc
static final ClassDesc
ClassDesc
representingDynamicCallSiteDesc
static final ClassDesc
ClassDesc
representingDynamicConstantDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representingEnum.EnumDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typefloat
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typeint
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typelong
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representingMethodHandle
static final ClassDesc
ClassDesc
representingMethodHandleDesc
static final ClassDesc
ClassDesc
representingDirectMethodHandleDesc.Kind
static final ClassDesc
ClassDesc
representingMethodHandles
static final ClassDesc
ClassDesc
representingMethodHandles.Lookup
static final ClassDesc
ClassDesc
representingMethodType
static final ClassDesc
ClassDesc
representingMethodTypeDesc
static final ClassDesc
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representing the primitive typeshort
static final ClassDesc
static final ClassDesc
static final ClassDesc
static final ClassDesc
static final ClassDesc
ClassDesc
representingVarHandle.VarHandleDesc
static final ClassDesc
ClassDesc
representing the primitive typevoid
static final ClassDesc
static final String
The special name of class initialization methods, "<clinit>".static final String
Invocation name to use when no name is needed, such as the name of a constructor, or the invocation name of a dynamic constant or dynamic callsite when the bootstrap is known to ignore the invocation name.static final DynamicConstantDesc
<Boolean> Nominal descriptor representing the constant Boolean.FALSEstatic final String
The special name of instance initialization methods, "<init>".static final MethodTypeDesc
Nominal descriptor representing the method descriptor()V
, taking no argument and returningvoid
.static final ConstantDesc
Nominal descriptor representing the constantnull
static final DynamicConstantDesc
<Boolean> Nominal descriptor representing the constant Boolean.TRUE -
Method Summary
Modifier and TypeMethodDescriptionstatic DirectMethodHandleDesc
ofCallsiteBootstrap
(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) Returns aMethodHandleDesc
corresponding to a bootstrap method for aninvokedynamic
callsite, which is a static method whose leading parameter types areLookup
,String
, andMethodType
.static DirectMethodHandleDesc
ofConstantBootstrap
(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) Returns aMethodHandleDesc
corresponding to a bootstrap method for a dynamic constant, which is a static method whose leading arguments areLookup
,String
, andClass
.
-
Field Details
-
DEFAULT_NAME
Invocation name to use when no name is needed, such as the name of a constructor, or the invocation name of a dynamic constant or dynamic callsite when the bootstrap is known to ignore the invocation name.- See Also:
-
CD_Object
-
CD_String
-
CD_Class
-
CD_Number
-
CD_Integer
-
CD_Long
-
CD_Float
-
CD_Double
-
CD_Short
-
CD_Byte
-
CD_Character
-
CD_Boolean
-
CD_Void
-
CD_Throwable
-
CD_Exception
-
CD_Enum
-
CD_VarHandle
-
CD_MethodHandles
ClassDesc
representingMethodHandles
-
CD_MethodHandles_Lookup
ClassDesc
representingMethodHandles.Lookup
-
CD_MethodHandle
ClassDesc
representingMethodHandle
-
CD_MethodType
ClassDesc
representingMethodType
-
CD_CallSite
-
CD_Collection
ClassDesc
representingCollection
-
CD_List
-
CD_Set
-
CD_Map
-
CD_ConstantDesc
ClassDesc
representingConstantDesc
-
CD_ClassDesc
-
CD_EnumDesc
ClassDesc
representingEnum.EnumDesc
-
CD_MethodTypeDesc
ClassDesc
representingMethodTypeDesc
-
CD_MethodHandleDesc
ClassDesc
representingMethodHandleDesc
-
CD_DirectMethodHandleDesc
ClassDesc
representingDirectMethodHandleDesc
-
CD_VarHandleDesc
ClassDesc
representingVarHandle.VarHandleDesc
-
CD_MethodHandleDesc_Kind
ClassDesc
representingDirectMethodHandleDesc.Kind
-
CD_DynamicConstantDesc
ClassDesc
representingDynamicConstantDesc
-
CD_DynamicCallSiteDesc
ClassDesc
representingDynamicCallSiteDesc
-
CD_ConstantBootstraps
ClassDesc
representingConstantBootstraps
-
BSM_PRIMITIVE_CLASS
MethodHandleDesc
representingConstantBootstraps.primitiveClass
-
BSM_ENUM_CONSTANT
MethodHandleDesc
representingConstantBootstraps.enumConstant
-
BSM_GET_STATIC_FINAL
MethodHandleDesc
representingConstantBootstraps.getStaticFinal
- Since:
- 15
-
BSM_NULL_CONSTANT
MethodHandleDesc
representingConstantBootstraps.nullConstant
-
BSM_VARHANDLE_FIELD
MethodHandleDesc
representingConstantBootstraps.fieldVarHandle
-
BSM_VARHANDLE_STATIC_FIELD
MethodHandleDesc
representingConstantBootstraps.staticFieldVarHandle
-
BSM_VARHANDLE_ARRAY
MethodHandleDesc
representingConstantBootstraps.arrayVarHandle
-
BSM_INVOKE
MethodHandleDesc
representingConstantBootstraps.invoke
-
BSM_EXPLICIT_CAST
MethodHandleDesc
representingConstantBootstraps.explicitCast
- Since:
- 15
-
CD_int
ClassDesc
representing the primitive typeint
-
CD_long
ClassDesc
representing the primitive typelong
-
CD_float
ClassDesc
representing the primitive typefloat
-
CD_double
ClassDesc
representing the primitive typedouble
-
CD_short
ClassDesc
representing the primitive typeshort
-
CD_byte
ClassDesc
representing the primitive typebyte
-
CD_char
ClassDesc
representing the primitive typechar
-
CD_boolean
ClassDesc
representing the primitive typeboolean
-
CD_void
ClassDesc
representing the primitive typevoid
-
BSM_CLASS_DATA
MethodHandleDesc
representingMethodHandles.classData
- Since:
- 21
-
BSM_CLASS_DATA_AT
MethodHandleDesc
representingMethodHandles.classDataAt
- Since:
- 21
-
NULL
Nominal descriptor representing the constantnull
-
TRUE
Nominal descriptor representing the constant Boolean.TRUE- Since:
- 15
-
FALSE
Nominal descriptor representing the constant Boolean.FALSE- Since:
- 15
-
INIT_NAME
The special name of instance initialization methods, "<init>". An instance initialization method has this special name and isvoid
.- See Java Virtual Machine Specification:
-
2.9.1 Instance Initialization Methods
- Since:
- 21
- See Also:
-
CLASS_INIT_NAME
The special name of class initialization methods, "<clinit>". A class initialization method has this special name,ACC_STATIC
flag set, isvoid
and takes no arguments.- See Java Virtual Machine Specification:
-
2.9.2 Class Initialization Methods
- Since:
- 21
- See Also:
-
MTD_void
Nominal descriptor representing the method descriptor()V
, taking no argument and returningvoid
.- Since:
- 21
-
-
Method Details
-
ofCallsiteBootstrap
public static DirectMethodHandleDesc ofCallsiteBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) Returns aMethodHandleDesc
corresponding to a bootstrap method for aninvokedynamic
callsite, which is a static method whose leading parameter types areLookup
,String
, andMethodType
.- Parameters:
owner
- the class declaring the methodname
- the unqualified name of the methodreturnType
- the return type of the methodparamTypes
- the types of the static bootstrap arguments, if any- Returns:
- the
MethodHandleDesc
- Throws:
NullPointerException
- if any of the arguments are null- See Java Virtual Machine Specification:
-
4.2.2 Unqualified Names
-
ofConstantBootstrap
public static DirectMethodHandleDesc ofConstantBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes) Returns aMethodHandleDesc
corresponding to a bootstrap method for a dynamic constant, which is a static method whose leading arguments areLookup
,String
, andClass
.- Parameters:
owner
- the class declaring the methodname
- the unqualified name of the methodreturnType
- the return type of the methodparamTypes
- the types of the static bootstrap arguments, if any- Returns:
- the
MethodHandleDesc
- Throws:
NullPointerException
- if any of the arguments are null- See Java Virtual Machine Specification:
-
4.2.2 Unqualified Names
-