- java.lang.Object
-
- java.lang.constant.ConstantDescs
-
public final class ConstantDescs extends Object
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
-
Method Summary
Modifier and Type Method Description 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
.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 Detail
-
DEFAULT_NAME
public static final String 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
public static final ClassDesc CD_Object
-
CD_String
public static final ClassDesc CD_String
-
CD_Class
public static final ClassDesc CD_Class
-
CD_Number
public static final ClassDesc CD_Number
-
CD_Integer
public static final ClassDesc CD_Integer
-
CD_Long
public static final ClassDesc CD_Long
-
CD_Float
public static final ClassDesc CD_Float
-
CD_Double
public static final ClassDesc CD_Double
-
CD_Short
public static final ClassDesc CD_Short
-
CD_Byte
public static final ClassDesc CD_Byte
-
CD_Character
public static final ClassDesc CD_Character
-
CD_Boolean
public static final ClassDesc CD_Boolean
-
CD_Void
public static final ClassDesc CD_Void
-
CD_Throwable
public static final ClassDesc CD_Throwable
-
CD_Exception
public static final ClassDesc CD_Exception
-
CD_Enum
public static final ClassDesc CD_Enum
-
CD_VarHandle
public static final ClassDesc CD_VarHandle
-
CD_MethodHandles
public static final ClassDesc CD_MethodHandles
ClassDesc
representingMethodHandles
-
CD_MethodHandles_Lookup
public static final ClassDesc CD_MethodHandles_Lookup
ClassDesc
representingMethodHandles.Lookup
-
CD_MethodHandle
public static final ClassDesc CD_MethodHandle
ClassDesc
representingMethodHandle
-
CD_MethodType
public static final ClassDesc CD_MethodType
ClassDesc
representingMethodType
-
CD_CallSite
public static final ClassDesc CD_CallSite
-
CD_Collection
public static final ClassDesc CD_Collection
ClassDesc
representingCollection
-
CD_List
public static final ClassDesc CD_List
-
CD_Set
public static final ClassDesc CD_Set
-
CD_Map
public static final ClassDesc CD_Map
-
CD_ConstantDesc
public static final ClassDesc CD_ConstantDesc
ClassDesc
representingConstantDesc
-
CD_ClassDesc
public static final ClassDesc CD_ClassDesc
-
CD_EnumDesc
public static final ClassDesc CD_EnumDesc
ClassDesc
representingEnum.EnumDesc
-
CD_MethodTypeDesc
public static final ClassDesc CD_MethodTypeDesc
ClassDesc
representingMethodTypeDesc
-
CD_MethodHandleDesc
public static final ClassDesc CD_MethodHandleDesc
ClassDesc
representingMethodHandleDesc
-
CD_DirectMethodHandleDesc
public static final ClassDesc CD_DirectMethodHandleDesc
ClassDesc
representingDirectMethodHandleDesc
-
CD_VarHandleDesc
public static final ClassDesc CD_VarHandleDesc
ClassDesc
representingVarHandle.VarHandleDesc
-
CD_MethodHandleDesc_Kind
public static final ClassDesc CD_MethodHandleDesc_Kind
ClassDesc
representingDirectMethodHandleDesc.Kind
-
CD_DynamicConstantDesc
public static final ClassDesc CD_DynamicConstantDesc
ClassDesc
representingDynamicConstantDesc
-
CD_DynamicCallSiteDesc
public static final ClassDesc CD_DynamicCallSiteDesc
ClassDesc
representingDynamicCallSiteDesc
-
CD_ConstantBootstraps
public static final ClassDesc CD_ConstantBootstraps
ClassDesc
representingConstantBootstraps
-
BSM_PRIMITIVE_CLASS
public static final DirectMethodHandleDesc BSM_PRIMITIVE_CLASS
MethodHandleDesc
representingConstantBootstraps.primitiveClass
-
BSM_ENUM_CONSTANT
public static final DirectMethodHandleDesc BSM_ENUM_CONSTANT
MethodHandleDesc
representingConstantBootstraps.enumConstant
-
BSM_NULL_CONSTANT
public static final DirectMethodHandleDesc BSM_NULL_CONSTANT
MethodHandleDesc
representingConstantBootstraps.nullConstant
-
BSM_VARHANDLE_FIELD
public static final DirectMethodHandleDesc BSM_VARHANDLE_FIELD
MethodHandleDesc
representingConstantBootstraps.fieldVarHandle
-
BSM_VARHANDLE_STATIC_FIELD
public static final DirectMethodHandleDesc BSM_VARHANDLE_STATIC_FIELD
MethodHandleDesc
representingConstantBootstraps.staticVarHandle
-
BSM_VARHANDLE_ARRAY
public static final DirectMethodHandleDesc BSM_VARHANDLE_ARRAY
MethodHandleDesc
representingConstantBootstraps.arrayVarHandle
-
BSM_INVOKE
public static final DirectMethodHandleDesc BSM_INVOKE
MethodHandleDesc
representingConstantBootstraps.invoke
-
CD_boolean
public static final ClassDesc CD_boolean
ClassDesc
representing the primitive typeboolean
-
NULL
public static final ConstantDesc NULL
Nominal descriptor representing the constantnull
-
-
Method Detail
-
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 The 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 The Java™ Virtual Machine Specification:
- 4.2.2 Unqualified Names
-
-