# 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.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.attribute
Provides interfaces describing `class` file attributes for the `java.lang.classfile` library.
java.lang.classfile.constantpool
Provides interfaces describing constant pool entries for the `java.lang.classfile` library.
java.lang.classfile.instruction
Provides interfaces describing code instructions for the `java.lang.classfile` library.
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.classfile

Methods in java.lang.classfile that return ClassDesc
Modifier and Type
Method
Description
`default ClassDesc`
Signature.ClassTypeSig.`classDesc()`
Returns this class or interface, as a symbolic descriptor.
`default ClassDesc`
Annotation.`classSymbol()`
Returns the annotation interface, as a symbolic descriptor.
`default ClassDesc`
AnnotationValue.OfClass.`classSymbol()`
Returns the class descriptor.
`default ClassDesc`
AnnotationValue.OfEnum.`classSymbol()`
Returns the enum class descriptor.
`default ClassDesc`
FieldModel.`fieldTypeSymbol()`
Returns the field type, as a symbolic descriptor.
`ClassDesc`
TypeKind.`upperBound()`
Returns the most specific upper bound field descriptor that can store any value of this type.
Methods in java.lang.classfile with parameters of type ClassDesc
Modifier and Type
Method
Description
`default CodeBuilder`
CodeBuilder.`anewarray(ClassDesc className)`
Generates an instruction to create a new array of `reference`.
`default byte[]`
ClassFile.`build(ClassDesc thisClass, Consumer<? super ClassBuilder> handler)`
Builds a `class` file into a byte array.
`default void`
ClassFile.`buildTo(Path path, ClassDesc thisClass, Consumer<ClassBuilder> handler)`
Builds a `class` file into a file in a file system.
`CodeBuilder.CatchBuilder`
CodeBuilder.CatchBuilder.`catching(ClassDesc exceptionType, Consumer<CodeBuilder.BlockCodeBuilder> catchHandler)`
Adds a catch block that catches an exception of the given type.
`default CodeBuilder`
CodeBuilder.`checkcast(ClassDesc type)`
Generates an instruction to check whether an object is of the given type, throwing a `ClassCastException` if the check fails.
`default CodeBuilder`
CodeBuilder.`exceptionCatch(Label start, Label end, Label handler, ClassDesc catchType)`
Declares an exception table entry.
`default CodeBuilder`
CodeBuilder.`fieldAccess(Opcode opcode, ClassDesc owner, String name, ClassDesc type)`
Generates an instruction to access a field.
`ClassHierarchyResolver.ClassHierarchyInfo`
ClassHierarchyResolver.`getClassInfo(ClassDesc classDesc)`
Returns the `ClassHierarchyInfo` for a given class name, or `null` if the name is unknown to the resolver.
`default CodeBuilder`
CodeBuilder.`getfield(ClassDesc owner, String name, ClassDesc type)`
Generates an instruction to fetch field from an object.
`default CodeBuilder`
CodeBuilder.`getstatic(ClassDesc owner, String name, ClassDesc type)`
Generates an instruction to get static field from a class or interface.
`default CodeBuilder`
CodeBuilder.`instanceOf(ClassDesc target)`
Generates an instruction to determine if an object is of the given type, producing a `boolean` result on the operand stack.
`default CodeBuilder`
CodeBuilder.`invoke(Opcode opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface)`
Generates an instruction to invoke a method.
`default CodeBuilder`
CodeBuilder.`invokeinterface(ClassDesc owner, String name, MethodTypeDesc type)`
Generates an instruction to invoke an interface method.
`default CodeBuilder`
CodeBuilder.`invokespecial(ClassDesc owner, String name, MethodTypeDesc type)`
Generates an instruction to invoke an instance method in a class; direct invocation of instance initialization methods and methods of the current class and its supertypes.
`default CodeBuilder`
CodeBuilder.`invokespecial(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface)`
Generates an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypes.
`default CodeBuilder`
CodeBuilder.`invokestatic(ClassDesc owner, String name, MethodTypeDesc type)`
Generates an instruction to invoke a class (static) method of a class.
`default CodeBuilder`
CodeBuilder.`invokestatic(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface)`
Generates an instruction to invoke a class (static) method.
`default CodeBuilder`
CodeBuilder.`invokevirtual(ClassDesc owner, String name, MethodTypeDesc type)`
Generates an instruction to invoke an instance method; dispatch based on class.
`default CodeBuilder`
CodeBuilder.`localVariable(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope)`
Declares a local variable entry.
`default CodeBuilder`
CodeBuilder.`multianewarray(ClassDesc array, int dims)`
Generates an instruction to create a new multidimensional array.
`default CodeBuilder`
CodeBuilder.`new_(ClassDesc clazz)`
Generates an instruction to create a new object.
`static Annotation`
Annotation.`of(ClassDesc annotationClass, AnnotationElement... elements)`
Returns an annotation.
`static Annotation`
Annotation.`of(ClassDesc annotationClass, List<AnnotationElement> elements)`
Returns an annotation.
`static Signature.BaseTypeSig`
Signature.BaseTypeSig.`of(ClassDesc classDesc)`
Returns the signature of a primitive type or void.
`static Signature.ClassTypeSig`
Signature.ClassTypeSig.`of(Signature.ClassTypeSig outerType, ClassDesc className, Signature.TypeArg... typeArgs)`
Deprecated, for removal: This API element is subject to removal in a future version.
The resulting signature does not denote the class represented by `className` when `outerType` is not null.
`static Signature.ClassTypeSig`
Signature.ClassTypeSig.`of(ClassDesc className, Signature.TypeArg... typeArgs)`
Returns a class or interface signature without an outer type.
`static Signature`
Signature.`of(ClassDesc classDesc)`
Returns a Java type signature from a field descriptor.
`static AnnotationElement`
AnnotationElement.`ofClass(String name, ClassDesc value)`
Returns an element-value pair for a class-valued element.
`static AnnotationValue.OfClass`
AnnotationValue.`ofClass(ClassDesc className)`
Returns a class value for an element-value pair.
`static ClassHierarchyResolver.ClassHierarchyInfo`
ClassHierarchyResolver.ClassHierarchyInfo.`ofClass(ClassDesc superClass)`
Indicates that a class is a declared class, with the specific given super class.
`static AnnotationValue.OfEnum`
AnnotationValue.`ofEnum(ClassDesc className, String constantName)`
Returns an enum value for an element-value pair.
`static Interfaces`
Interfaces.`ofSymbols(ClassDesc... interfaces)`
Returns an Interfaces element.
`default CodeBuilder`
CodeBuilder.`putfield(ClassDesc owner, String name, ClassDesc type)`
Generates an instruction to set field in an object.
`default CodeBuilder`
CodeBuilder.`putstatic(ClassDesc owner, String name, ClassDesc type)`
Generates an instruction to set static field in a class.
`default byte[]`
ClassFile.`transformClass(ClassModel model, ClassDesc newClassName, ClassTransform transform)`
Transform one `class` file into a new `class` file according to a `ClassTransform`.
`default ClassBuilder`
ClassBuilder.`withField(String name, ClassDesc descriptor, int flags)`
Adds a field, with only access flags.
`default ClassBuilder`
ClassBuilder.`withField(String name, ClassDesc descriptor, Consumer<? super FieldBuilder> handler)`
Adds a field.
`default ClassBuilder`
ClassBuilder.`withInterfaceSymbols(ClassDesc... interfaces)`
Sets the interfaces of this class.
`default ClassBuilder`
ClassBuilder.`withSuperclass(ClassDesc desc)`
Sets the superclass of this class.
Method parameters in java.lang.classfile with type arguments of type ClassDesc
Modifier and Type
Method
Description
`default ClassHierarchyResolver`
ClassHierarchyResolver.`cached(Supplier<Map<ClassDesc, ClassHierarchyResolver.ClassHierarchyInfo>> cacheFactory)`
Returns a `ClassHierarchyResolver` that caches class hierarchy information from this resolver.
`CodeBuilder.CatchBuilder`
CodeBuilder.CatchBuilder.`catchingMulti(List<ClassDesc> exceptionTypes, Consumer<CodeBuilder.BlockCodeBuilder> catchHandler)`
Adds a catch block that catches exceptions of the given types.
`static ClassHierarchyResolver`
ClassHierarchyResolver.`of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass)`
Returns a `ClassHierarchyResolver` that extracts class hierarchy information from collections of class hierarchy metadata.
`static ClassHierarchyResolver`
ClassHierarchyResolver.`of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass)`
Returns a `ClassHierarchyResolver` that extracts class hierarchy information from collections of class hierarchy metadata.
`static ClassHierarchyResolver`
ClassHierarchyResolver.`of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass)`
Returns a `ClassHierarchyResolver` that extracts class hierarchy information from collections of class hierarchy metadata.
`static ClassHierarchyResolver`
ClassHierarchyResolver.`ofResourceParsing(Function<ClassDesc, InputStream> classStreamResolver)`
Returns a `ClassHierarchyResolver` that extracts class hierarchy information from `class` files returned by a mapping function.
`static Interfaces`
Interfaces.`ofSymbols(List<ClassDesc> interfaces)`
Returns an Interfaces element.
`default ClassBuilder`
ClassBuilder.`withInterfaceSymbols(List<ClassDesc> interfaces)`
Sets the interfaces of this class.

## Uses of ClassDesc in java.lang.classfile.attribute

Methods in java.lang.classfile.attribute that return ClassDesc
Modifier and Type
Method
Description
`default ClassDesc`
StackMapFrameInfo.ObjectVerificationTypeInfo.`classSymbol()`
Returns the class of the object, as a symbolic descriptor.
`default ClassDesc`
RecordComponentInfo.`descriptorSymbol()`
Returns the symbolic field descriptor of this component.
`default ClassDesc`
LocalVariableInfo.`typeSymbol()`
Returns the field descriptor of the local variable.
Methods in java.lang.classfile.attribute with parameters of type ClassDesc
Modifier and Type
Method
Description
`static EnclosingMethodAttribute`
EnclosingMethodAttribute.`of(ClassDesc className, Optional<String> methodName, Optional<MethodTypeDesc> methodType)`
Returns an `EnclosingMethod` attribute.
`static InnerClassInfo`
InnerClassInfo.`of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags)`
Returns a nested class description.
`static InnerClassInfo`
InnerClassInfo.`of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags)`
Returns a nested class description.
`static ModuleMainClassAttribute`
ModuleMainClassAttribute.`of(ClassDesc mainClass)`
Returns a `ModuleMainClass` attribute.
`static ModuleProvideInfo`
ModuleProvideInfo.`of(ClassDesc provides, ClassDesc... providesWith)`
Returns a service provision description.
`static ModuleProvideInfo`
ModuleProvideInfo.`of(ClassDesc provides, List<ClassDesc> providesWith)`
Returns a service provision description.
`static NestHostAttribute`
NestHostAttribute.`of(ClassDesc nestHost)`
Returns a `NestHost` attribute.
`static RecordComponentInfo`
RecordComponentInfo.`of(String name, ClassDesc descriptor, Attribute<?>... attributes)`
Returns a record component description.
`static RecordComponentInfo`
RecordComponentInfo.`of(String name, ClassDesc descriptor, List<Attribute<?>> attributes)`
Returns a record component description.
`static StackMapFrameInfo.ObjectVerificationTypeInfo`
StackMapFrameInfo.ObjectVerificationTypeInfo.`of(ClassDesc classDesc)`
Returns a new object verification type info.
`static ExceptionsAttribute`
ExceptionsAttribute.`ofSymbols(ClassDesc... exceptions)`
Returns an `Exceptions` attribute.
`static NestMembersAttribute`
NestMembersAttribute.`ofSymbols(ClassDesc... nestMembers)`
Returns a `NestMembers` attribute.
`static PermittedSubclassesAttribute`
PermittedSubclassesAttribute.`ofSymbols(ClassDesc... permittedSubclasses)`
Returns a `PermittedSubclasses` attribute.
`ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`provides(ClassDesc service, ClassDesc... implClasses)`
Declares provision of a service.
`ModuleAttribute.ModuleAttributeBuilder`
ModuleAttribute.ModuleAttributeBuilder.`uses(ClassDesc service)`
Declares use of a service.
Method parameters in java.lang.classfile.attribute with type arguments of type ClassDesc
Modifier and Type
Method
Description
`static InnerClassInfo`
InnerClassInfo.`of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags)`
Returns a nested class description.
`static InnerClassInfo`
InnerClassInfo.`of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags)`
Returns a nested class description.
`static ModuleProvideInfo`
ModuleProvideInfo.`of(ClassDesc provides, List<ClassDesc> providesWith)`
Returns a service provision description.
`static ExceptionsAttribute`
ExceptionsAttribute.`ofSymbols(List<ClassDesc> exceptions)`
Returns an `Exceptions` attribute.
`static NestMembersAttribute`
NestMembersAttribute.`ofSymbols(List<ClassDesc> nestMembers)`
Returns a `NestMembers` attribute.
`static PermittedSubclassesAttribute`
PermittedSubclassesAttribute.`ofSymbols(List<ClassDesc> permittedSubclasses)`
Returns a `PermittedSubclasses` attribute.

## Uses of ClassDesc in java.lang.classfile.constantpool

Methods in java.lang.classfile.constantpool that return ClassDesc
Modifier and Type
Method
Description
`ClassDesc`
ClassEntry.`asSymbol()`
Returns the represented reference type, as a symbolic descriptor.
`default ClassDesc`
ConstantDynamicEntry.`typeSymbol()`
Returns a symbolic descriptor for the field type of this dynamically-computed constant.
`default ClassDesc`
FieldRefEntry.`typeSymbol()`
Returns a symbolic descriptor for the field type.
Methods in java.lang.classfile.constantpool with parameters of type ClassDesc
Modifier and Type
Method
Description
`default ClassEntry`
ConstantPoolBuilder.`classEntry(ClassDesc classDesc)`
Returns a `ClassEntry` describing the same reference type as the provided `ClassDesc`.
`default FieldRefEntry`
ConstantPoolBuilder.`fieldRefEntry(ClassDesc owner, String name, ClassDesc type)`
Returns a `FieldRefEntry` describing a field of a class.
`default InterfaceMethodRefEntry`
ConstantPoolBuilder.`interfaceMethodRefEntry(ClassDesc owner, String name, MethodTypeDesc type)`
Returns an `InterfaceMethodRefEntry` describing a method of an interface.
`boolean`
Utf8Entry.`isFieldType(ClassDesc desc)`
Returns whether this entry describes the descriptor string of this field type.
`boolean`
ClassEntry.`matches(ClassDesc desc)`
Returns whether this entry describes the given reference type.
`default MethodRefEntry`
ConstantPoolBuilder.`methodRefEntry(ClassDesc owner, String name, MethodTypeDesc type)`
Returns a `MethodRefEntry` describing a method of a class.
`default NameAndTypeEntry`
ConstantPoolBuilder.`nameAndTypeEntry(String name, ClassDesc type)`
Returns a `NameAndTypeEntry` describing the provided unqualified name and field descriptor.
`default Utf8Entry`
ConstantPoolBuilder.`utf8Entry(ClassDesc desc)`
Returns a `Utf8Entry` describing the field descriptor string of the provided `ClassDesc`.

## Uses of ClassDesc in java.lang.classfile.instruction

Methods in java.lang.classfile.instruction that return ClassDesc
Modifier and Type
Method
Description
`default ClassDesc`
FieldInstruction.`typeSymbol()`
Returns a symbolic descriptor for the type of the field.
`default ClassDesc`
LocalVariable.`typeSymbol()`
Returns the local variable type, as a symbolic descriptor.
Methods in java.lang.classfile.instruction with parameters of type ClassDesc
Modifier and Type
Method
Description
`static LocalVariable`
LocalVariable.`of(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope)`
Returns a local variable pseudo-instruction.
`static TypeCheckInstruction`
TypeCheckInstruction.`of(Opcode op, ClassDesc type)`
Returns a type check instruction.

## Uses of ClassDesc in java.lang.constant

Subinterfaces with type arguments of type ClassDesc in java.lang.constant
Modifier and Type
Interface
Description
`interface`
`ClassDesc`
A nominal descriptor for a `Class` constant.
`interface`
`MethodTypeDesc`
A nominal descriptor for a MethodType 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
`ClassDesc`
ClassDesc.`arrayType()`
Returns a ClassDesc for an array type whose component type is described by this ClassDesc.
`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.
`static ClassDesc`
ClassDesc.`ofInternalName(String name)`
Returns a ClassDesc for a class or interface type, given the name of the class or interface in internal form, such as `"java/lang/String"`.
`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)`
Returns a MethodTypeDesc with the given return type and no parameter types.
`static MethodTypeDesc`
MethodTypeDesc.`of(ClassDesc returnDesc, ClassDesc... paramDescs)`
Returns a MethodTypeDesc given the return type and parameter types.
`static MethodTypeDesc`
MethodTypeDesc.`of(ClassDesc returnDesc, List<ClassDesc> paramDescs)`
Returns a MethodTypeDesc given the return type and a list of 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.
Method parameters in java.lang.constant with type arguments of type ClassDesc
Modifier and Type
Method
Description
`static MethodTypeDesc`
MethodTypeDesc.`of(ClassDesc returnDesc, List<ClassDesc> paramDescs)`
Returns a MethodTypeDesc given the return type and a list of parameter types.
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.