java.lang.Object
java.lang.constant.ConstantDescs
Predefined values ofnominal 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
FieldsModifier and TypeFieldDescriptionstatic finalDirectMethodHandleDescMethodHandleDescrepresentingMethodHandles.classDatastatic finalDirectMethodHandleDescMethodHandleDescrepresentingMethodHandles.classDataAtstatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.enumConstantstatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.explicitCaststatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.getStaticFinalstatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.invokestatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.nullConstantstatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.primitiveClassstatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.arrayVarHandlestatic finalDirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.fieldVarHandlestatic finalDirectMethodHandleDescstatic finalClassDescClassDescrepresenting the primitive typebooleanstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typebytestatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typecharstatic finalClassDescstatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresentingCollectionstatic finalClassDescClassDescrepresentingConstantBootstrapsstatic finalClassDescClassDescrepresentingConstantDescstatic finalClassDescClassDescrepresentingDirectMethodHandleDescstatic finalClassDescClassDescrepresenting the primitive typedoublestatic finalClassDescstatic finalClassDescClassDescrepresentingDynamicCallSiteDescstatic finalClassDescClassDescrepresentingDynamicConstantDescstatic finalClassDescstatic finalClassDescClassDescrepresentingEnum.EnumDescstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typefloatstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typeintstatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typelongstatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresentingMethodHandlestatic finalClassDescClassDescrepresentingMethodHandleDescstatic finalClassDescClassDescrepresentingDirectMethodHandleDesc.Kindstatic finalClassDescClassDescrepresentingMethodHandlesstatic finalClassDescClassDescrepresentingMethodHandles.Lookupstatic finalClassDescClassDescrepresentingMethodTypestatic finalClassDescClassDescrepresentingMethodTypeDescstatic finalClassDescstatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresenting the primitive typeshortstatic finalClassDescstatic finalClassDescstatic finalClassDescstatic finalClassDescstatic finalClassDescClassDescrepresentingVarHandle.VarHandleDescstatic finalClassDescClassDescrepresenting the primitive typevoidstatic finalClassDescstatic finalStringThe special name of class initialization methods, "<clinit>".static finalStringInvocation 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 finalDynamicConstantDesc<Boolean> Nominal descriptor representing the constantBoolean.FALSEstatic finalStringThe special name of instance initialization methods, "<init>".static finalMethodTypeDescNominal descriptor representing the method descriptor()V, taking no argument and returningvoid.static finalConstantDescNominal descriptor representing the constantnullstatic finalDynamicConstantDesc<Boolean> Nominal descriptor representing the constantBoolean.TRUEMethod Summary
Modifier and TypeMethodDescriptionstaticDirectMethodHandleDescofCallsiteBootstrap(ClassDesc owner,String name,ClassDesc returnType,ClassDesc... paramTypes) Returns aMethodHandleDesccorresponding to a bootstrap method for aninvokedynamiccallsite, which is a static method whose leading parameter types areLookup,String, andMethodType.staticDirectMethodHandleDescofConstantBootstrap(ClassDesc owner,String name,ClassDesc returnType,ClassDesc... paramTypes) Returns aMethodHandleDesccorresponding 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
ClassDescrepresentingMethodHandlesCD_MethodHandles_Lookup
ClassDescrepresentingMethodHandles.LookupCD_MethodHandle
ClassDescrepresentingMethodHandleCD_MethodType
ClassDescrepresentingMethodTypeCD_CallSite
CD_Collection
ClassDescrepresentingCollectionCD_List
CD_Set
CD_Map
CD_ConstantDesc
ClassDescrepresentingConstantDescCD_ClassDesc
CD_EnumDesc
ClassDescrepresentingEnum.EnumDescCD_MethodTypeDesc
ClassDescrepresentingMethodTypeDescCD_MethodHandleDesc
ClassDescrepresentingMethodHandleDescCD_DirectMethodHandleDesc
ClassDescrepresentingDirectMethodHandleDescCD_VarHandleDesc
ClassDescrepresentingVarHandle.VarHandleDescCD_MethodHandleDesc_Kind
ClassDescrepresentingDirectMethodHandleDesc.KindCD_DynamicConstantDesc
ClassDescrepresentingDynamicConstantDescCD_DynamicCallSiteDesc
ClassDescrepresentingDynamicCallSiteDescCD_ConstantBootstraps
ClassDescrepresentingConstantBootstrapsBSM_PRIMITIVE_CLASS
MethodHandleDescrepresentingConstantBootstraps.primitiveClassBSM_ENUM_CONSTANT
MethodHandleDescrepresentingConstantBootstraps.enumConstantBSM_GET_STATIC_FINAL
MethodHandleDescrepresentingConstantBootstraps.getStaticFinal- Since:
- 15
BSM_NULL_CONSTANT
MethodHandleDescrepresentingConstantBootstraps.nullConstantBSM_VARHANDLE_FIELD
MethodHandleDescrepresentingConstantBootstraps.fieldVarHandleBSM_VARHANDLE_STATIC_FIELD
BSM_VARHANDLE_ARRAY
MethodHandleDescrepresentingConstantBootstraps.arrayVarHandleBSM_INVOKE
MethodHandleDescrepresentingConstantBootstraps.invokeBSM_EXPLICIT_CAST
MethodHandleDescrepresentingConstantBootstraps.explicitCast- Since:
- 15
CD_int
ClassDescrepresenting the primitive typeintCD_long
ClassDescrepresenting the primitive typelongCD_float
ClassDescrepresenting the primitive typefloatCD_double
ClassDescrepresenting the primitive typedoubleCD_short
ClassDescrepresenting the primitive typeshortCD_byte
ClassDescrepresenting the primitive typebyteCD_char
ClassDescrepresenting the primitive typecharCD_boolean
ClassDescrepresenting the primitive typebooleanCD_void
ClassDescrepresenting the primitive typevoidBSM_CLASS_DATA
MethodHandleDescrepresentingMethodHandles.classData- Since:
- 21
BSM_CLASS_DATA_AT
MethodHandleDescrepresentingMethodHandles.classDataAt- Since:
- 21
NULL
Nominal descriptor representing the constantnullTRUE
Nominal descriptor representing the constantBoolean.TRUE- Since:
- 15
FALSE
Nominal descriptor representing the constantBoolean.FALSE- Since:
- 15
INIT_NAME
The special name of instance initialization methods, "<init>". An instance initialization method has this special name and isvoid.- SeeJava 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_STATICflag set, isvoidand takes no arguments.- SeeJava 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 aMethodHandleDesccorresponding to a bootstrap method for aninvokedynamiccallsite, 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- SeeJava Virtual Machine Specification:
- 4.2.2 Unqualified Names
ofConstantBootstrap
public static DirectMethodHandleDesc ofConstantBootstrap(ClassDesc owner,String name,ClassDesc returnType,ClassDesc... paramTypes) Returns aMethodHandleDesccorresponding 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- SeeJava Virtual Machine Specification:
- 4.2.2 Unqualified Names