# Uses of Interface
java.lang.constant.ClassDesc

Packages that use ClassDesc
Package
Description
java.lang
Provides classes that are fundamental to the design of the Java programming language.
java.lang.constant
Classes and interfaces to represent nominal descriptors for run-time entities such as classes or method handles, and classfile entities such as constant pool entries or `invokedynamic` call sites.
java.lang.invoke
The `java.lang.invoke` package provides low-level primitives for interacting with the Java Virtual Machine.

## Uses of ClassDesc in java.lang

Methods in java.lang that return types with arguments of type ClassDesc
Modifier and Type
Method
Description
`Optional<ClassDesc>`
Class.`describeConstable()`
Returns a nominal descriptor for this instance, if one can be constructed, or an empty `Optional` if one cannot be.
Methods in java.lang with parameters of type ClassDesc
Modifier and Type
Method
Description
`static <E extends Enum<E>>
Enum.EnumDesc<E>`
Enum.EnumDesc.`of(ClassDesc enumClass, String constantName)`
Returns a nominal descriptor for the specified `enum` class and name

## Uses of ClassDesc in java.lang.constant

Fields in java.lang.constant declared as ClassDesc
Modifier and Type
Field
Description
`static final ClassDesc`
ConstantDescs.`CD_boolean`
`ClassDesc` representing the primitive type `boolean`
`static final ClassDesc`
ConstantDescs.`CD_Boolean`
`ClassDesc` representing `Boolean`
`static final ClassDesc`
ConstantDescs.`CD_byte`
`ClassDesc` representing the primitive type `byte`
`static final ClassDesc`
ConstantDescs.`CD_Byte`
`ClassDesc` representing `Byte`
`static final ClassDesc`
ConstantDescs.`CD_CallSite`
`ClassDesc` representing `CallSite`
`static final ClassDesc`
ConstantDescs.`CD_char`
`ClassDesc` representing the primitive type `char`
`static final ClassDesc`
ConstantDescs.`CD_Character`
`ClassDesc` representing `Character`
`static final ClassDesc`
ConstantDescs.`CD_Class`
`ClassDesc` representing `Class`
`static final ClassDesc`
ConstantDescs.`CD_ClassDesc`
`ClassDesc` representing `ClassDesc`
`static final ClassDesc`
ConstantDescs.`CD_Collection`
`ClassDesc` representing `Collection`
`static final ClassDesc`
ConstantDescs.`CD_ConstantBootstraps`
`ClassDesc` representing `ConstantBootstraps`
`static final ClassDesc`
ConstantDescs.`CD_ConstantDesc`
`ClassDesc` representing `ConstantDesc`
`static final ClassDesc`
ConstantDescs.`CD_DirectMethodHandleDesc`
`ClassDesc` representing `DirectMethodHandleDesc`
`static final ClassDesc`
ConstantDescs.`CD_double`
`ClassDesc` representing the primitive type `double`
`static final ClassDesc`
ConstantDescs.`CD_Double`
`ClassDesc` representing `Double`
`static final ClassDesc`
ConstantDescs.`CD_DynamicCallSiteDesc`
`ClassDesc` representing `DynamicCallSiteDesc`
`static final ClassDesc`
ConstantDescs.`CD_DynamicConstantDesc`
`ClassDesc` representing `DynamicConstantDesc`
`static final ClassDesc`
ConstantDescs.`CD_Enum`
`ClassDesc` representing `Enum`
`static final ClassDesc`
ConstantDescs.`CD_EnumDesc`
`ClassDesc` representing `Enum.EnumDesc`
`static final ClassDesc`
ConstantDescs.`CD_Exception`
`ClassDesc` representing `Exception`
`static final ClassDesc`
ConstantDescs.`CD_float`
`ClassDesc` representing the primitive type `float`
`static final ClassDesc`
ConstantDescs.`CD_Float`
`ClassDesc` representing `Float`
`static final ClassDesc`
ConstantDescs.`CD_int`
`ClassDesc` representing the primitive type `int`
`static final ClassDesc`
ConstantDescs.`CD_Integer`
`ClassDesc` representing `Integer`
`static final ClassDesc`
ConstantDescs.`CD_List`
`ClassDesc` representing `List`
`static final ClassDesc`
ConstantDescs.`CD_long`
`ClassDesc` representing the primitive type `long`
`static final ClassDesc`
ConstantDescs.`CD_Long`
`ClassDesc` representing `Long`
`static final ClassDesc`
ConstantDescs.`CD_Map`
`ClassDesc` representing `Map`
`static final ClassDesc`
ConstantDescs.`CD_MethodHandle`
`ClassDesc` representing `MethodHandle`
`static final ClassDesc`
ConstantDescs.`CD_MethodHandleDesc`
`ClassDesc` representing `MethodHandleDesc`
`static final ClassDesc`
ConstantDescs.`CD_MethodHandleDesc_Kind`
`ClassDesc` representing `DirectMethodHandleDesc.Kind`
`static final ClassDesc`
ConstantDescs.`CD_MethodHandles`
`ClassDesc` representing `MethodHandles`
`static final ClassDesc`
ConstantDescs.`CD_MethodHandles_Lookup`
`ClassDesc` representing `MethodHandles.Lookup`
`static final ClassDesc`
ConstantDescs.`CD_MethodType`
`ClassDesc` representing `MethodType`
`static final ClassDesc`
ConstantDescs.`CD_MethodTypeDesc`
`ClassDesc` representing `MethodTypeDesc`
`static final ClassDesc`
ConstantDescs.`CD_Number`
`ClassDesc` representing `Number`
`static final ClassDesc`
ConstantDescs.`CD_Object`
`ClassDesc` representing `Object`
`static final ClassDesc`
ConstantDescs.`CD_Set`
`ClassDesc` representing `Set`
`static final ClassDesc`
ConstantDescs.`CD_short`
`ClassDesc` representing the primitive type `short`
`static final ClassDesc`
ConstantDescs.`CD_Short`
`ClassDesc` representing `Short`
`static final ClassDesc`
ConstantDescs.`CD_String`
`ClassDesc` representing `String`
`static final ClassDesc`
ConstantDescs.`CD_Throwable`
`ClassDesc` representing `Throwable`
`static final ClassDesc`
ConstantDescs.`CD_VarHandle`
`ClassDesc` representing `VarHandle`
`static final ClassDesc`
ConstantDescs.`CD_VarHandleDesc`
`ClassDesc` representing `VarHandle.VarHandleDesc`
`static final ClassDesc`
ConstantDescs.`CD_void`
`ClassDesc` representing the primitive type `void`
`static final ClassDesc`
ConstantDescs.`CD_Void`
`ClassDesc` representing `Void`
Methods in java.lang.constant that return ClassDesc
Modifier and Type
Method
Description
`default ClassDesc`
ClassDesc.`arrayType()`
Returns a ClassDesc for an array type whose component type is described by this ClassDesc.
`default ClassDesc`
ClassDesc.`arrayType(int rank)`
Returns a ClassDesc for an array type of the specified rank, whose component type is described by this ClassDesc.
`default ClassDesc`
ClassDesc.`componentType()`
Returns the component type of this ClassDesc, if it describes an array type, or `null` otherwise.
`ClassDesc`
DynamicConstantDesc.`constantType()`
Returns a `ClassDesc` describing the type that would appear in the `NameAndType` operand of the `LDC` for this constant.
`default ClassDesc`
ClassDesc.`nested(String nestedName)`
Returns a ClassDesc for a nested class of the class or interface type described by this ClassDesc.
`default ClassDesc`
ClassDesc.`nested(String firstNestedName, String... moreNestedNames)`
Returns a ClassDesc for a nested class of the class or interface type described by this ClassDesc.
`static ClassDesc`
ClassDesc.`of(String name)`
Returns a ClassDesc for a class or interface type, given the name of the class or interface, such as `"java.lang.String"`.
`static ClassDesc`
ClassDesc.`of(String packageName, String className)`
Returns a ClassDesc for a class or interface type, given a package name and the unqualified (simple) name for the class or interface.
`static ClassDesc`
ClassDesc.`ofDescriptor(String descriptor)`
Returns a ClassDesc given a descriptor string for a class, interface, array, or primitive type.
`ClassDesc`
DirectMethodHandleDesc.`owner()`
Returns a `ClassDesc` describing the class declaring the method or field described by this nominal descriptor.
`ClassDesc[]`
MethodTypeDesc.`parameterArray()`
Returns the parameter types as an array.
`ClassDesc`
MethodTypeDesc.`parameterType(int index)`
Returns the parameter type of the `index`'th parameter of the method type described by this MethodTypeDesc.
`ClassDesc`
MethodTypeDesc.`returnType()`
Gets the return type of the method type described by this MethodTypeDesc.
Methods in java.lang.constant that return types with arguments of type ClassDesc
Modifier and Type
Method
Description
`List<ClassDesc>`
MethodTypeDesc.`parameterList()`
Returns the parameter types as an immutable `List`.
Methods in java.lang.constant with parameters of type ClassDesc
Modifier and Type
Method
Description
`MethodTypeDesc`
MethodTypeDesc.`changeParameterType(int index, ClassDesc paramType)`
Returns a MethodTypeDesc that is identical to this one, except that a single parameter type has been changed to the specified type.
`MethodTypeDesc`
MethodTypeDesc.`changeReturnType(ClassDesc returnType)`
Returns a MethodTypeDesc that is identical to this one, except with the specified return type.
`MethodTypeDesc`
MethodTypeDesc.`insertParameterTypes(int pos, ClassDesc... paramTypes)`
Returns a MethodTypeDesc that is identical to this one, except that a range of additional parameter types have been inserted.
`static DirectMethodHandleDesc`
MethodHandleDesc.`of(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, String lookupDescriptor)`
Creates a MethodHandleDesc corresponding to an invocation of a declared method, invocation of a constructor, or access to a field.
`static MethodTypeDesc`
MethodTypeDesc.`of(ClassDesc returnDesc, ClassDesc... paramDescs)`
Returns a MethodTypeDesc given the return type and parameter types.
`static DirectMethodHandleDesc`
ConstantDescs.`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`.
`static <T> ConstantDesc`
DynamicConstantDesc.`ofCanonical(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs)`
Returns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available.
`static DirectMethodHandleDesc`
ConstantDescs.`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`.
`static DirectMethodHandleDesc`
MethodHandleDesc.`ofConstructor(ClassDesc owner, ClassDesc... paramTypes)`
Returns a MethodHandleDesc corresponding to invocation of a constructor
`static DirectMethodHandleDesc`
MethodHandleDesc.`ofField(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String fieldName, ClassDesc fieldType)`
Creates a MethodHandleDesc corresponding to a method handle that accesses a field.
`static DirectMethodHandleDesc`
MethodHandleDesc.`ofMethod(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType)`
Creates a MethodHandleDesc corresponding to an invocation of a declared method or constructor.
`static <T> DynamicConstantDesc<T>`
DynamicConstantDesc.`ofNamed(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)`
Returns a nominal descriptor for a dynamic constant.
Constructors in java.lang.constant with parameters of type ClassDesc
Modifier
Constructor
Description
`protected`
`DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)`
Creates a nominal descriptor for a dynamic constant.

## Uses of ClassDesc in java.lang.invoke

Methods in java.lang.invoke that return ClassDesc
Modifier and Type
Method
Description
`ClassDesc`
VarHandle.VarHandleDesc.`varType()`
Returns a `ClassDesc` describing the type of the variable described by this descriptor.
Methods in java.lang.invoke with parameters of type ClassDesc
Modifier and Type
Method
Description
`static VarHandle.VarHandleDesc`
VarHandle.VarHandleDesc.`ofArray(ClassDesc arrayClass)`
Returns a VarHandle.VarHandleDesc corresponding to a `VarHandle` for an array type.
`static VarHandle.VarHandleDesc`
VarHandle.VarHandleDesc.`ofField(ClassDesc declaringClass, String name, ClassDesc fieldType)`
Returns a VarHandle.VarHandleDesc corresponding to a `VarHandle` for an instance field.
`static VarHandle.VarHandleDesc`
VarHandle.VarHandleDesc.`ofStaticField(ClassDesc declaringClass, String name, ClassDesc fieldType)`
Returns a VarHandle.VarHandleDesc corresponding to a `VarHandle` for a static field.