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:
ConstantDesc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.enumConstantstatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.explicitCast(Lookup, String, Class, Object)ConstantBootstraps.explicitCast}static DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.getStaticFinalstatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.invokestatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.nullConstantstatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.primitiveClassstatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.arrayVarHandlestatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.fieldVarHandlestatic DirectMethodHandleDescMethodHandleDescrepresentingConstantBootstraps.staticVarHandlestatic ClassDescClassDescrepresenting the primitive typebooleanstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typebytestatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typecharstatic ClassDescstatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresentingCollectionstatic ClassDescClassDescrepresentingConstantBootstrapsstatic ClassDescClassDescrepresentingConstantDescstatic ClassDescClassDescrepresentingDirectMethodHandleDescstatic ClassDescClassDescrepresenting the primitive typedoublestatic ClassDescstatic ClassDescClassDescrepresentingDynamicCallSiteDescstatic ClassDescClassDescrepresentingDynamicConstantDescstatic ClassDescstatic ClassDescClassDescrepresentingEnum.EnumDescstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typefloatstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typeintstatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typelongstatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresentingMethodHandlestatic ClassDescClassDescrepresentingMethodHandleDescstatic ClassDescClassDescrepresentingDirectMethodHandleDesc.Kindstatic ClassDescClassDescrepresentingMethodHandlesstatic ClassDescClassDescrepresentingMethodHandles.Lookupstatic ClassDescClassDescrepresentingMethodTypestatic ClassDescClassDescrepresentingMethodTypeDescstatic ClassDescstatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresenting the primitive typeshortstatic ClassDescstatic ClassDescstatic ClassDescstatic ClassDescstatic ClassDescClassDescrepresentingVarHandle.VarHandleDescstatic ClassDescClassDescrepresenting the primitive typevoidstatic ClassDescstatic StringInvocation 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 DynamicConstantDesc<Boolean>Nominal descriptor representing the constant Boolean.FALSEstatic ConstantDescNominal descriptor representing the constantnullstatic DynamicConstantDesc<Boolean>Nominal descriptor representing the constant Boolean.TRUE -
Method Summary
Modifier and TypeMethodDescriptionstatic DirectMethodHandleDescofCallsiteBootstrap(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.static DirectMethodHandleDescofConstantBootstrap(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:
- Constant Field Values
-
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
ClassDescrepresentingMethodHandles -
CD_MethodHandles_Lookup
ClassDescrepresentingMethodHandles.Lookup -
CD_MethodHandle
ClassDescrepresentingMethodHandle -
CD_MethodType
ClassDescrepresentingMethodType -
CD_CallSite
-
CD_Collection
ClassDescrepresentingCollection -
CD_List
-
CD_Set
-
CD_Map
-
CD_ConstantDesc
ClassDescrepresentingConstantDesc -
CD_ClassDesc
-
CD_EnumDesc
ClassDescrepresentingEnum.EnumDesc -
CD_MethodTypeDesc
ClassDescrepresentingMethodTypeDesc -
CD_MethodHandleDesc
ClassDescrepresentingMethodHandleDesc -
CD_DirectMethodHandleDesc
ClassDescrepresentingDirectMethodHandleDesc -
CD_VarHandleDesc
ClassDescrepresentingVarHandle.VarHandleDesc -
CD_MethodHandleDesc_Kind
ClassDescrepresentingDirectMethodHandleDesc.Kind -
CD_DynamicConstantDesc
ClassDescrepresentingDynamicConstantDesc -
CD_DynamicCallSiteDesc
ClassDescrepresentingDynamicCallSiteDesc -
CD_ConstantBootstraps
ClassDescrepresentingConstantBootstraps -
BSM_PRIMITIVE_CLASS
MethodHandleDescrepresentingConstantBootstraps.primitiveClass -
BSM_ENUM_CONSTANT
MethodHandleDescrepresentingConstantBootstraps.enumConstant -
BSM_GET_STATIC_FINAL
MethodHandleDescrepresentingConstantBootstraps.getStaticFinal- Since:
- 15
-
BSM_NULL_CONSTANT
MethodHandleDescrepresentingConstantBootstraps.nullConstant -
BSM_VARHANDLE_FIELD
MethodHandleDescrepresentingConstantBootstraps.fieldVarHandle -
BSM_VARHANDLE_STATIC_FIELD
MethodHandleDescrepresentingConstantBootstraps.staticVarHandle -
BSM_VARHANDLE_ARRAY
MethodHandleDescrepresentingConstantBootstraps.arrayVarHandle -
BSM_INVOKE
MethodHandleDescrepresentingConstantBootstraps.invoke -
BSM_EXPLICIT_CAST
MethodHandleDescrepresentingConstantBootstraps.explicitCast(Lookup, String, Class, Object)ConstantBootstraps.explicitCast}- Since:
- 15
-
CD_int
ClassDescrepresenting the primitive typeint -
CD_long
ClassDescrepresenting the primitive typelong -
CD_float
ClassDescrepresenting the primitive typefloat -
CD_double
ClassDescrepresenting the primitive typedouble -
CD_short
ClassDescrepresenting the primitive typeshort -
CD_byte
ClassDescrepresenting the primitive typebyte -
CD_char
ClassDescrepresenting the primitive typechar -
CD_boolean
ClassDescrepresenting the primitive typeboolean -
CD_void
ClassDescrepresenting the primitive typevoid -
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
-
-
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- See Java 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- See Java Virtual Machine Specification:
-
4.2.2 Unqualified Names
-