APIdia Launch Partner
Top Description Fields Constructors Methods
java.lang.constant

public final Class ConstantDescs

extends Object
Class Inheritance
Annotations
@AOTSafeClassInitializer
Imports
jdk.internal.constant.ClassOrInterfaceDescImpl, .ConstantUtils, .MethodTypeDescImpl, .PrimitiveClassDescImpl, jdk.internal.vm.annotation.AOTSafeClassInitializer, java.lang.Enum.EnumDesc, java.lang.invoke.CallSite, .ConstantBootstraps, .MethodHandle, .MethodHandles, .MethodHandles.Lookup, .MethodType, .VarHandle, .VarHandle.VarHandleDesc, java.util.Collection, .List, .Map, .Set

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

Modifier and TypeField and Description
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final DirectMethodHandleDesc
public static final ClassDesc
public static final ClassDesc
CD_boolean

ClassDesc representing the primitive type boolean

public static final ClassDesc
CD_Byte

ClassDesc representing Byte

public static final ClassDesc
CD_byte

ClassDesc representing the primitive type byte

public static final ClassDesc
public static final ClassDesc
CD_char

ClassDesc representing the primitive type char

public static final ClassDesc
public static final ClassDesc
CD_Class

ClassDesc representing Class

public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
CD_double

ClassDesc representing the primitive type double

public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
CD_Enum

ClassDesc representing Enum

public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
CD_Float

ClassDesc representing Float

public static final ClassDesc
CD_float

ClassDesc representing the primitive type float

public static final ClassDesc
CD_int

ClassDesc representing the primitive type int

public static final ClassDesc
public static final ClassDesc
CD_List

ClassDesc representing List

public static final ClassDesc
CD_Long

ClassDesc representing Long

public static final ClassDesc
CD_long

ClassDesc representing the primitive type long

public static final ClassDesc
CD_Map

ClassDesc representing Map

public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
CD_Set

ClassDesc representing Set

public static final ClassDesc
CD_Short

ClassDesc representing Short

public static final ClassDesc
CD_short

ClassDesc representing the primitive type short

public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
public static final ClassDesc
CD_Void

ClassDesc representing Void

public static final ClassDesc
CD_void

ClassDesc representing the primitive type void

public static final String
CLASS_INIT_NAME

The special name of class initialization methods, .

private static final ClassDesc[]
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.

public static final DynamicConstantDesc<Boolean>
FALSE

Nominal descriptor representing the constant Boolean#FALSE

private static final ClassDesc[]
public static final String
INIT_NAME

The special name of instance initialization methods, .

public static final MethodTypeDesc
MTD_void

Nominal descriptor representing the method descriptor ()V, taking no argument and returning void.

public static final ConstantDesc
NULL

Nominal descriptor representing the constant null

public static final DynamicConstantDesc<Boolean>
TRUE

Nominal descriptor representing the constant Boolean#TRUE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DirectMethodHandleDesc

Returns:

the MethodHandleDesc
ofCallsiteBootstrap
(ClassDesc
the class declaring the method
owner
,
String
the unqualified name of the method
name
,
ClassDesc
the return type of the method
returnType
,
ClassDesc...
the types of the static bootstrap arguments, if any
paramTypes
)

Returns a MethodHandleDesc corresponding to a bootstrap method for an invokedynamic callsite, which is a static method whose leading parameter types are Lookup, String, and MethodType.

public static DirectMethodHandleDesc

Returns:

the MethodHandleDesc
ofConstantBootstrap
(ClassDesc
the class declaring the method
owner
,
String
the unqualified name of the method
name
,
ClassDesc
the return type of the method
returnType
,
ClassDesc...
the types of the static bootstrap arguments, if any
paramTypes
)

Returns a MethodHandleDesc corresponding to a bootstrap method for a dynamic constant, which is a static method whose leading arguments are Lookup, String, and Class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BSM_CLASS_DATAback to summary
public static final DirectMethodHandleDesc BSM_CLASS_DATA

MethodHandleDesc representing MethodHandles.classData

Since
21
BSM_CLASS_DATA_ATback to summary
public static final DirectMethodHandleDesc BSM_CLASS_DATA_AT

MethodHandleDesc representing MethodHandles.classDataAt

Since
21
BSM_ENUM_CONSTANTback to summary
public static final DirectMethodHandleDesc BSM_ENUM_CONSTANT

MethodHandleDesc representing ConstantBootstraps.enumConstant

BSM_EXPLICIT_CASTback to summary
public static final DirectMethodHandleDesc BSM_EXPLICIT_CAST

MethodHandleDesc representing ConstantBootstraps.explicitCast

Since
15
BSM_GET_STATIC_FINALback to summary
public static final DirectMethodHandleDesc BSM_GET_STATIC_FINAL

MethodHandleDesc representing ConstantBootstraps.getStaticFinal

Since
15
BSM_INVOKEback to summary
public static final DirectMethodHandleDesc BSM_INVOKE

MethodHandleDesc representing ConstantBootstraps.invoke

BSM_NULL_CONSTANTback to summary
public static final DirectMethodHandleDesc BSM_NULL_CONSTANT

MethodHandleDesc representing ConstantBootstraps.nullConstant

BSM_PRIMITIVE_CLASSback to summary
public static final DirectMethodHandleDesc BSM_PRIMITIVE_CLASS

MethodHandleDesc representing ConstantBootstraps.primitiveClass

BSM_VARHANDLE_ARRAYback to summary
public static final DirectMethodHandleDesc BSM_VARHANDLE_ARRAY

MethodHandleDesc representing ConstantBootstraps.arrayVarHandle

BSM_VARHANDLE_FIELDback to summary
public static final DirectMethodHandleDesc BSM_VARHANDLE_FIELD

MethodHandleDesc representing ConstantBootstraps.fieldVarHandle

BSM_VARHANDLE_STATIC_FIELDback to summary
public static final DirectMethodHandleDesc BSM_VARHANDLE_STATIC_FIELD

MethodHandleDesc representing ConstantBootstraps.staticFieldVarHandle

CD_Booleanback to summary
public static final ClassDesc CD_Boolean

ClassDesc representing Boolean

CD_booleanback to summary
public static final ClassDesc CD_boolean

ClassDesc representing the primitive type boolean

CD_Byteback to summary
public static final ClassDesc CD_Byte

ClassDesc representing Byte

CD_byteback to summary
public static final ClassDesc CD_byte

ClassDesc representing the primitive type byte

CD_CallSiteback to summary
public static final ClassDesc CD_CallSite

ClassDesc representing CallSite

CD_charback to summary
public static final ClassDesc CD_char

ClassDesc representing the primitive type char

CD_Characterback to summary
public static final ClassDesc CD_Character

ClassDesc representing Character

CD_Classback to summary
public static final ClassDesc CD_Class

ClassDesc representing Class

CD_ClassDescback to summary
public static final ClassDesc CD_ClassDesc

ClassDesc representing ClassDesc

CD_Collectionback to summary
public static final ClassDesc CD_Collection

ClassDesc representing Collection

CD_ConstantBootstrapsback to summary
public static final ClassDesc CD_ConstantBootstraps

ClassDesc representing ConstantBootstraps

CD_ConstantDescback to summary
public static final ClassDesc CD_ConstantDesc

ClassDesc representing ConstantDesc

CD_DirectMethodHandleDescback to summary
public static final ClassDesc CD_DirectMethodHandleDesc

ClassDesc representing DirectMethodHandleDesc

CD_Doubleback to summary
public static final ClassDesc CD_Double

ClassDesc representing Double

CD_doubleback to summary
public static final ClassDesc CD_double

ClassDesc representing the primitive type double

CD_DynamicCallSiteDescback to summary
public static final ClassDesc CD_DynamicCallSiteDesc

ClassDesc representing DynamicCallSiteDesc

CD_DynamicConstantDescback to summary
public static final ClassDesc CD_DynamicConstantDesc

ClassDesc representing DynamicConstantDesc

CD_Enumback to summary
public static final ClassDesc CD_Enum

ClassDesc representing Enum

CD_EnumDescback to summary
public static final ClassDesc CD_EnumDesc

ClassDesc representing EnumDesc

CD_Exceptionback to summary
public static final ClassDesc CD_Exception

ClassDesc representing Exception

CD_Floatback to summary
public static final ClassDesc CD_Float

ClassDesc representing Float

CD_floatback to summary
public static final ClassDesc CD_float

ClassDesc representing the primitive type float

CD_intback to summary
public static final ClassDesc CD_int

ClassDesc representing the primitive type int

CD_Integerback to summary
public static final ClassDesc CD_Integer

ClassDesc representing Integer

CD_Listback to summary
public static final ClassDesc CD_List

ClassDesc representing List

CD_Longback to summary
public static final ClassDesc CD_Long

ClassDesc representing Long

CD_longback to summary
public static final ClassDesc CD_long

ClassDesc representing the primitive type long

CD_Mapback to summary
public static final ClassDesc CD_Map

ClassDesc representing Map

CD_MethodHandleback to summary
public static final ClassDesc CD_MethodHandle

ClassDesc representing MethodHandle

CD_MethodHandleDescback to summary
public static final ClassDesc CD_MethodHandleDesc

ClassDesc representing MethodHandleDesc

CD_MethodHandleDesc_Kindback to summary
public static final ClassDesc CD_MethodHandleDesc_Kind

ClassDesc representing DirectMethodHandleDesc.Kind

CD_MethodHandlesback to summary
public static final ClassDesc CD_MethodHandles

ClassDesc representing MethodHandles

CD_MethodHandles_Lookupback to summary
public static final ClassDesc CD_MethodHandles_Lookup

ClassDesc representing MethodHandles.Lookup

CD_MethodTypeback to summary
public static final ClassDesc CD_MethodType

ClassDesc representing MethodType

CD_MethodTypeDescback to summary
public static final ClassDesc CD_MethodTypeDesc

ClassDesc representing MethodTypeDesc

CD_Numberback to summary
public static final ClassDesc CD_Number

ClassDesc representing Number

CD_Objectback to summary
public static final ClassDesc CD_Object

ClassDesc representing Object

CD_Setback to summary
public static final ClassDesc CD_Set

ClassDesc representing Set

CD_Shortback to summary
public static final ClassDesc CD_Short

ClassDesc representing Short

CD_shortback to summary
public static final ClassDesc CD_short

ClassDesc representing the primitive type short

CD_Stringback to summary
public static final ClassDesc CD_String

ClassDesc representing String

CD_Throwableback to summary
public static final ClassDesc CD_Throwable

ClassDesc representing Throwable

CD_VarHandleback to summary
public static final ClassDesc CD_VarHandle

ClassDesc representing VarHandle

CD_VarHandleDescback to summary
public static final ClassDesc CD_VarHandleDesc

ClassDesc representing VarHandleDesc

CD_Voidback to summary
public static final ClassDesc CD_Void

ClassDesc representing Void

CD_voidback to summary
public static final ClassDesc CD_void

ClassDesc representing the primitive type void

CLASS_INIT_NAMEback to summary
public static final String CLASS_INIT_NAME

The special name of class initialization methods, . A class initialization method has this special name, ACC_STATIC flag set, is void and takes no arguments.

Since
21
Java Virtual Machine Specification
2.9.2 Class Initialization Methods
CONDY_BOOTSTRAP_ARGSback to summary
private static final ClassDesc[] CONDY_BOOTSTRAP_ARGS
DEFAULT_NAMEback to summary
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.

FALSEback to summary
public static final DynamicConstantDesc<Boolean> FALSE

Nominal descriptor representing the constant Boolean#FALSE

Since
15
INDY_BOOTSTRAP_ARGSback to summary
private static final ClassDesc[] INDY_BOOTSTRAP_ARGS
INIT_NAMEback to summary
public static final String INIT_NAME

The special name of instance initialization methods, . An instance initialization method has this special name and is void.

Since
21
Java Virtual Machine Specification
2.9.1 Instance Initialization Methods
MTD_voidback to summary
public static final MethodTypeDesc MTD_void

Nominal descriptor representing the method descriptor ()V, taking no argument and returning void.

Since
21
NULLback to summary
public static final ConstantDesc NULL

Nominal descriptor representing the constant null

TRUEback to summary
public static final DynamicConstantDesc<Boolean> TRUE

Nominal descriptor representing the constant Boolean#TRUE

Since
15

Constructor Detail

ConstantDescsback to summary
private ConstantDescs()

Method Detail

ofCallsiteBootstrapback to summary
public static DirectMethodHandleDesc ofCallsiteBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)

Returns a MethodHandleDesc corresponding to a bootstrap method for an invokedynamic callsite, which is a static method whose leading parameter types are Lookup, String, and MethodType.

Parameters
owner:ClassDesc

the class declaring the method

name:String

the unqualified name of the method

returnType:ClassDesc

the return type of the method

paramTypes:ClassDesc[]

the types of the static bootstrap arguments, if any

Returns:DirectMethodHandleDesc

the MethodHandleDesc

Exceptions
NullPointerException:
if any of the arguments are null
Java Virtual Machine Specification
4.2.2 Unqualified Names
ofConstantBootstrapback to summary
public static DirectMethodHandleDesc ofConstantBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)

Returns a MethodHandleDesc corresponding to a bootstrap method for a dynamic constant, which is a static method whose leading arguments are Lookup, String, and Class.

Parameters
owner:ClassDesc

the class declaring the method

name:String

the unqualified name of the method

returnType:ClassDesc

the return type of the method

paramTypes:ClassDesc[]

the types of the static bootstrap arguments, if any

Returns:DirectMethodHandleDesc

the MethodHandleDesc

Exceptions
NullPointerException:
if any of the arguments are null
Java Virtual Machine Specification
4.2.2 Unqualified Names