Uses of Interface
java.lang.constant.ClassDesc
Packages that use ClassDesc
Package
Description
Provides classes that are fundamental to the design of the Java
programming language.
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing classfile attributes for the
java.lang.classfilePREVIEW library.Provides specific components, transformations, and tools built on top of the
java.lang.classfilePREVIEW library.Provides interfaces describing classfile constant pool entries for the
java.lang.classfilePREVIEW library.Provides interfaces describing code instructions for the
java.lang.classfilePREVIEW library.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.The
java.lang.invoke package provides low-level primitives for interacting
with the Java Virtual Machine.-
Uses of ClassDesc in java.lang
Modifier and TypeMethodDescriptionClass.describeConstable()Returns a nominal descriptor for this instance, if one can be constructed, or an emptyOptionalif one cannot be.Modifier and TypeMethodDescriptionstatic <E extends Enum<E>>
Enum.EnumDesc<E> Returns a nominal descriptor for the specifiedenumclass and name -
Uses of ClassDesc in java.lang.classfilePREVIEW
Methods in java.lang.classfilePREVIEW that return ClassDescModifier and TypeMethodDescriptiondefault ClassDescSignature.ClassTypeSig.classDesc()Returns the class name, as a symbolic descriptor.default ClassDescAnnotation.classSymbol()Returns the class of the annotation, as a symbolic descriptor.default ClassDescAnnotationValue.OfClass.classSymbol()Returns the class symbol.default ClassDescAnnotationValue.OfEnum.classSymbol()Returns the enum class symbol.default ClassDescFieldModel.fieldTypeSymbol()Returns the field descriptor of this field, as a symbolic descriptor.Methods in java.lang.classfilePREVIEW with parameters of type ClassDescModifier and TypeMethodDescriptiondefault CodeBuilderPREVIEWGenerate an instruction to create a new array of referencedefault byte[]ClassFile.build(ClassDesc thisClass, Consumer<? super ClassBuilderPREVIEW> handler) Build a classfile into a byte array.default voidBuild a classfile into a file.CodeBuilder.CatchBuilder.catching(ClassDesc exceptionType, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) Adds a catch block that catches an exception of the given type.default CodeBuilderPREVIEWGenerate an instruction to check whether an object is of the given typedefault CodeBuilderPREVIEWCodeBuilder.exceptionCatch(LabelPREVIEW start, LabelPREVIEW end, LabelPREVIEW handler, ClassDesc catchType) Declare an exception table entrydefault CodeBuilderPREVIEWGenerate an instruction to access a fieldClassHierarchyResolver.getClassInfo(ClassDesc classDesc) Returns theClassHierarchyResolver.ClassHierarchyInfoPREVIEW for a given class name, or null if the name is unknown to the resolver.default CodeBuilderPREVIEWGenerate an instruction to fetch field from an objectdefault CodeBuilderPREVIEWGenerate an instruction to get static field from a classdefault CodeBuilderPREVIEWCodeBuilder.instanceOf(ClassDesc target) Generate an instruction to determine if an object is of the given typedefault CodeBuilderPREVIEWCodeBuilder.invoke(OpcodePREVIEW opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) Generate an instruction to invoke a method or constructordefault CodeBuilderPREVIEWCodeBuilder.invokeinterface(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an interface methoddefault CodeBuilderPREVIEWCodeBuilder.invokespecial(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEWCodeBuilder.invokespecial(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke an instance method; direct invocation of instance initialization methods and methods of the current class and its supertypesdefault CodeBuilderPREVIEWCodeBuilder.invokestatic(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEWCodeBuilder.invokestatic(ClassDesc owner, String name, MethodTypeDesc type, boolean isInterface) Generate an instruction to invoke a class (static) methoddefault CodeBuilderPREVIEWCodeBuilder.invokevirtual(ClassDesc owner, String name, MethodTypeDesc type) Generate an instruction to invoke an instance method; dispatch based on classdefault CodeBuilderPREVIEWCodeBuilder.localVariable(int slot, String name, ClassDesc descriptor, LabelPREVIEW startScope, LabelPREVIEW endScope) Declare a local variable entrydefault CodeBuilderPREVIEWCodeBuilder.multianewarray(ClassDesc array, int dims) Generate an instruction to create a new multidimensional arraydefault CodeBuilderPREVIEWGenerate an instruction to create a new objectstatic AnnotationPREVIEWAnnotation.of(ClassDesc annotationClass, AnnotationElementPREVIEW... elements) Returns an annotation.static AnnotationPREVIEWAnnotation.of(ClassDesc annotationClass, List<AnnotationElementPREVIEW> elements) Returns an annotation.static Signature.BaseTypeSigPREVIEWReturns the signature of a primitive type or void.Signature.ClassTypeSig.of(Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature for an inner class.Signature.ClassTypeSig.of(ClassDesc className, Signature.TypeArgPREVIEW... typeArgs) Returns a class type signature.Returns a Java type signature.static TypeAnnotationPREVIEWTypeAnnotation.of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, ClassDesc annotationClass, AnnotationElementPREVIEW... annotationElements) Returns a type annotation.static TypeAnnotationPREVIEWTypeAnnotation.of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, ClassDesc annotationClass, List<AnnotationElementPREVIEW> annotationElements) Returns a type annotation.static AnnotationElementPREVIEWReturns an annotation key-value pair for a class-valued annotation.Returns an annotation element for a class-valued element.Indicates that a class is a declared class, with the specific given super class.Returns an annotation element for a enum-valued element.static InterfacesPREVIEWReturns an InterfacesPREVIEW element.default CodeBuilderPREVIEWGenerate an instruction to set field in an objectdefault CodeBuilderPREVIEWGenerate an instruction to set static field in a classdefault byte[]ClassFile.transform(ClassModelPREVIEW model, ClassDesc newClassName, ClassTransformPREVIEW transform) Transform one classfile into a new classfile with the aid of aClassTransformPREVIEW.default ClassBuilderPREVIEWAdds a field.default ClassBuilderPREVIEWClassBuilder.withField(String name, ClassDesc descriptor, Consumer<? super FieldBuilderPREVIEW> handler) Adds a field.default ClassBuilderPREVIEWClassBuilder.withInterfaceSymbols(ClassDesc... interfaces) Sets the interfaces of this class.default ClassBuilderPREVIEWClassBuilder.withSuperclass(ClassDesc desc) Sets the superclass of this class.Method parameters in java.lang.classfilePREVIEW with type arguments of type ClassDescModifier and TypeMethodDescriptiondefault ClassHierarchyResolverPREVIEWClassHierarchyResolver.cached(Supplier<Map<ClassDesc, ClassHierarchyResolver.ClassHierarchyInfoPREVIEW>> cacheFactory) Returns a ClassHierarchyResolver that caches class hierarchy information from this resolver.CodeBuilder.CatchBuilder.catchingMulti(List<ClassDesc> exceptionTypes, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler) Adds a catch block that catches exceptions of the given types.ClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) Returns a ClassHierarchyResolverPREVIEW that extracts class hierarchy information from collections of class hierarchy metadataClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) Returns a ClassHierarchyResolverPREVIEW that extracts class hierarchy information from collections of class hierarchy metadataClassHierarchyResolver.of(Collection<ClassDesc> interfaces, Map<ClassDesc, ClassDesc> classToSuperClass) Returns a ClassHierarchyResolverPREVIEW that extracts class hierarchy information from collections of class hierarchy metadataClassHierarchyResolver.ofResourceParsing(Function<ClassDesc, InputStream> classStreamResolver) Returns a ClassHierarchyResolverPREVIEW that extracts class hierarchy information from classfiles located by a mapping function.static InterfacesPREVIEWReturns an InterfacesPREVIEW element.default ClassBuilderPREVIEWClassBuilder.withInterfaceSymbols(List<ClassDesc> interfaces) Sets the interfaces of this class. -
Uses of ClassDesc in java.lang.classfile.attributePREVIEW
Methods in java.lang.classfile.attributePREVIEW that return ClassDescModifier and TypeMethodDescriptiondefault ClassDescStackMapFrameInfo.ObjectVerificationTypeInfo.classSymbol()Returns the class of the object.default ClassDescRecordComponentInfo.descriptorSymbol()Returns the field descriptor of this component, as a ClassDesc.default ClassDescLocalVariableInfo.typeSymbol()Returns the field descriptor of the local variable.Methods in java.lang.classfile.attributePREVIEW with parameters of type ClassDescModifier and TypeMethodDescriptionEnclosingMethodAttribute.of(ClassDesc className, Optional<String> methodName, Optional<MethodTypeDesc> methodType) Returns anEnclosingMethodattribute.static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags) Returns an inner class description.static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) Returns an inner class description.Returns aModuleMainClassattribute.static ModuleProvideInfoPREVIEWReturns a service provision description.static ModuleProvideInfoPREVIEWReturns a service provision description.static NestHostAttributePREVIEWReturns aNestHostattribute.static RecordComponentInfoPREVIEWReturns a record component description.static RecordComponentInfoPREVIEWReturns a record component description.Returns a new object verification type info.static ExceptionsAttributePREVIEWReturns anExceptionsattribute.static NestMembersAttributePREVIEWReturns aNestMembersattribute.Returns aPermittedSubclassesattribute.Declares provision of a serviceDeclares use of a serviceMethod parameters in java.lang.classfile.attributePREVIEW with type arguments of type ClassDescModifier and TypeMethodDescriptionstatic InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, int flags) Returns an inner class description.static InnerClassInfoPREVIEWInnerClassInfo.of(ClassDesc innerClass, Optional<ClassDesc> outerClass, Optional<String> innerName, AccessFlag... flags) Returns an inner class description.static ModuleProvideInfoPREVIEWReturns a service provision description.static ExceptionsAttributePREVIEWReturns anExceptionsattribute.static NestMembersAttributePREVIEWReturns aNestMembersattribute.Returns aPermittedSubclassesattribute. -
Uses of ClassDesc in java.lang.classfile.componentsPREVIEW
Methods in java.lang.classfile.componentsPREVIEW that return ClassDescModifier and TypeMethodDescriptionAccess method to internal class mapping function.Methods in java.lang.classfile.componentsPREVIEW with parameters of type ClassDescModifier and TypeMethodDescriptionAccess method to internal class mapping function.Method parameters in java.lang.classfile.componentsPREVIEW with type arguments of type ClassDescModifier and TypeMethodDescriptionstatic ClassRemapperPREVIEWCreates new instance ofClassRemapperinstructed with a map function.static ClassRemapperPREVIEWCreates new instance ofClassRemapperinstructed with a map function.static ClassRemapperPREVIEWCreates new instance ofClassRemapperinstructed with a class map.static ClassRemapperPREVIEWCreates new instance ofClassRemapperinstructed with a class map. -
Uses of ClassDesc in java.lang.classfile.constantpoolPREVIEW
Methods in java.lang.classfile.constantpoolPREVIEW that return ClassDescModifier and TypeMethodDescriptionClassEntry.asSymbol()Returns the class name, as a symbolic descriptor.default ClassDescConstantDynamicEntry.typeSymbol()Returns a symbolic descriptor for the dynamic constant's type.default ClassDescFieldRefEntry.typeSymbol()Returns a symbolic descriptor for the field's type.Methods in java.lang.classfile.constantpoolPREVIEW with parameters of type ClassDescModifier and TypeMethodDescriptiondefault ClassEntryPREVIEWConstantPoolBuilder.classEntry(ClassDesc classDesc) default FieldRefEntryPREVIEWConstantPoolBuilder.fieldRefEntry(ClassDesc owner, String name, ClassDesc type) Returns AFieldRefEntryPREVIEW describing a field of a class.default InterfaceMethodRefEntryPREVIEWConstantPoolBuilder.interfaceMethodRefEntry(ClassDesc owner, String name, MethodTypeDesc type) Returns AInterfaceMethodRefEntryPREVIEW describing a method of a class.default MethodRefEntryPREVIEWConstantPoolBuilder.methodRefEntry(ClassDesc owner, String name, MethodTypeDesc type) Returns AMethodRefEntryPREVIEW describing a method of a class.default NameAndTypeEntryPREVIEWConstantPoolBuilder.nameAndTypeEntry(String name, ClassDesc type) Returns ANameAndTypeEntryPREVIEW describing the provided name and type. -
Uses of ClassDesc in java.lang.classfile.instructionPREVIEW
Methods in java.lang.classfile.instructionPREVIEW that return ClassDescModifier and TypeMethodDescriptiondefault ClassDescFieldInstruction.typeSymbol()Returns a symbolic descriptor for the type of the field.default ClassDescLocalVariable.typeSymbol()Returns the local variable type, as a symbolic descriptor.Methods in java.lang.classfile.instructionPREVIEW with parameters of type ClassDesc -
Uses of ClassDesc in java.lang.constant
Subinterfaces with type arguments of type ClassDesc in java.lang.constantModifier and TypeInterfaceDescriptioninterfaceA nominal descriptor for aClassconstant.interfaceA nominal descriptor for a MethodType constant.Fields in java.lang.constant declared as ClassDescModifier and TypeFieldDescriptionstatic final ClassDescConstantDescs.CD_booleanClassDescrepresenting the primitive typebooleanstatic final ClassDescConstantDescs.CD_Booleanstatic final ClassDescConstantDescs.CD_byteClassDescrepresenting the primitive typebytestatic final ClassDescConstantDescs.CD_Bytestatic final ClassDescConstantDescs.CD_CallSitestatic final ClassDescConstantDescs.CD_charClassDescrepresenting the primitive typecharstatic final ClassDescConstantDescs.CD_Characterstatic final ClassDescConstantDescs.CD_Classstatic final ClassDescConstantDescs.CD_ClassDescstatic final ClassDescConstantDescs.CD_CollectionClassDescrepresentingCollectionstatic final ClassDescConstantDescs.CD_ConstantBootstrapsClassDescrepresentingConstantBootstrapsstatic final ClassDescConstantDescs.CD_ConstantDescClassDescrepresentingConstantDescstatic final ClassDescConstantDescs.CD_DirectMethodHandleDescClassDescrepresentingDirectMethodHandleDescstatic final ClassDescConstantDescs.CD_doubleClassDescrepresenting the primitive typedoublestatic final ClassDescConstantDescs.CD_Doublestatic final ClassDescConstantDescs.CD_DynamicCallSiteDescClassDescrepresentingDynamicCallSiteDescstatic final ClassDescConstantDescs.CD_DynamicConstantDescClassDescrepresentingDynamicConstantDescstatic final ClassDescConstantDescs.CD_Enumstatic final ClassDescConstantDescs.CD_EnumDescClassDescrepresentingEnum.EnumDescstatic final ClassDescConstantDescs.CD_Exceptionstatic final ClassDescConstantDescs.CD_floatClassDescrepresenting the primitive typefloatstatic final ClassDescConstantDescs.CD_Floatstatic final ClassDescConstantDescs.CD_intClassDescrepresenting the primitive typeintstatic final ClassDescConstantDescs.CD_Integerstatic final ClassDescConstantDescs.CD_Liststatic final ClassDescConstantDescs.CD_longClassDescrepresenting the primitive typelongstatic final ClassDescConstantDescs.CD_Longstatic final ClassDescConstantDescs.CD_Mapstatic final ClassDescConstantDescs.CD_MethodHandleClassDescrepresentingMethodHandlestatic final ClassDescConstantDescs.CD_MethodHandleDescClassDescrepresentingMethodHandleDescstatic final ClassDescConstantDescs.CD_MethodHandleDesc_KindClassDescrepresentingDirectMethodHandleDesc.Kindstatic final ClassDescConstantDescs.CD_MethodHandlesClassDescrepresentingMethodHandlesstatic final ClassDescConstantDescs.CD_MethodHandles_LookupClassDescrepresentingMethodHandles.Lookupstatic final ClassDescConstantDescs.CD_MethodTypeClassDescrepresentingMethodTypestatic final ClassDescConstantDescs.CD_MethodTypeDescClassDescrepresentingMethodTypeDescstatic final ClassDescConstantDescs.CD_Numberstatic final ClassDescConstantDescs.CD_Objectstatic final ClassDescConstantDescs.CD_Setstatic final ClassDescConstantDescs.CD_shortClassDescrepresenting the primitive typeshortstatic final ClassDescConstantDescs.CD_Shortstatic final ClassDescConstantDescs.CD_Stringstatic final ClassDescConstantDescs.CD_Throwablestatic final ClassDescConstantDescs.CD_VarHandlestatic final ClassDescConstantDescs.CD_VarHandleDescClassDescrepresentingVarHandle.VarHandleDescstatic final ClassDescConstantDescs.CD_voidClassDescrepresenting the primitive typevoidstatic final ClassDescConstantDescs.CD_VoidMethods in java.lang.constant that return ClassDescModifier and TypeMethodDescriptiondefault ClassDescClassDesc.arrayType()default ClassDescClassDesc.arrayType(int rank) default ClassDescClassDesc.componentType()Returns the component type of this ClassDesc, if it describes an array type, ornullotherwise.DynamicConstantDesc.constantType()Returns aClassDescdescribing the type that would appear in theNameAndTypeoperand of theLDCfor this constant.default ClassDescdefault ClassDescstatic ClassDescReturns a ClassDesc for a class or interface type, given the name of the class or interface, such as"java.lang.String".static ClassDescReturns a ClassDesc for a class or interface type, given a package name and the unqualified (simple) name for the class or interface.static ClassDescClassDesc.ofDescriptor(String descriptor) Returns a ClassDesc given a descriptor string for a class, interface, array, or primitive type.static ClassDescClassDesc.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".DirectMethodHandleDesc.owner()Returns aClassDescdescribing the class declaring the method or field described by this nominal descriptor.MethodTypeDesc.parameterArray()Returns the parameter types as an array.MethodTypeDesc.parameterType(int index) Returns the parameter type of theindex'th parameter of the method type described by this MethodTypeDesc.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 ClassDescModifier and TypeMethodDescriptionMethodTypeDesc.parameterList()Returns the parameter types as an immutableList.Methods in java.lang.constant with parameters of type ClassDescModifier and TypeMethodDescriptionMethodTypeDesc.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.changeReturnType(ClassDesc returnType) Returns a MethodTypeDesc that is identical to this one, except with the specified return type.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 DirectMethodHandleDescMethodHandleDesc.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 MethodTypeDescReturns a MethodTypeDesc with the given return type and no parameter types.static MethodTypeDescReturns a MethodTypeDesc given the return type and parameter types.static MethodTypeDescReturns a MethodTypeDesc given the return type and a list of parameter types.static DirectMethodHandleDescConstantDescs.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.static <T> ConstantDescDynamicConstantDesc.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 DirectMethodHandleDescConstantDescs.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.static DirectMethodHandleDescMethodHandleDesc.ofConstructor(ClassDesc owner, ClassDesc... paramTypes) Returns a MethodHandleDesc corresponding to invocation of a constructorstatic DirectMethodHandleDescMethodHandleDesc.ofField(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String fieldName, ClassDesc fieldType) Creates a MethodHandleDesc corresponding to a method handle that accesses a field.static DirectMethodHandleDescMethodHandleDesc.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 ClassDescModifier and TypeMethodDescriptionstatic MethodTypeDescReturns a MethodTypeDesc given the return type and a list of parameter types.Constructors in java.lang.constant with parameters of type ClassDescModifierConstructorDescriptionprotectedDynamicConstantDesc(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 ClassDescModifier and TypeMethodDescriptionVarHandle.VarHandleDesc.varType()Returns aClassDescdescribing the type of the variable described by this descriptor.Methods in java.lang.invoke with parameters of type ClassDescModifier and TypeMethodDescriptionstatic VarHandle.VarHandleDescReturns a VarHandle.VarHandleDesc corresponding to aVarHandlefor an array type.static VarHandle.VarHandleDescReturns a VarHandle.VarHandleDesc corresponding to aVarHandlefor an instance field.static VarHandle.VarHandleDescVarHandle.VarHandleDesc.ofStaticField(ClassDesc declaringClass, String name, ClassDesc fieldType) Returns a VarHandle.VarHandleDesc corresponding to aVarHandlefor a static field.