# Uses of Interface
java.lang.classfile.constantpool.Utf8Entry

Packages that use Utf8Entry
Package
Description
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.

## Uses of Utf8Entry in java.lang.classfile

Methods in java.lang.classfile that return Utf8Entry
Modifier and Type
Method
Description
`Utf8Entry`
Attribute.`attributeName()`
Returns the name of the attribute.
`Utf8Entry`
CustomAttribute.`attributeName()`
Returns the name of the attribute.
`Utf8Entry`
Annotation.`className()`
Returns the constant pool entry holding the descriptor string of the annotation interface.
`Utf8Entry`
AnnotationValue.OfClass.`className()`
Returns the class descriptor string.
`Utf8Entry`
AnnotationValue.OfEnum.`className()`
Returns the enum class descriptor string.
`Utf8Entry`
AnnotationValue.OfString.`constant()`
Returns the backing UTF8 entry.
`Utf8Entry`
AnnotationValue.OfEnum.`constantName()`
Returns the enum constant name.
`Utf8Entry`
FieldModel.`fieldName()`
Returns the name of this field.
`Utf8Entry`
FieldModel.`fieldType()`
Returns the field descriptor string of this field.
`Utf8Entry`
MethodModel.`methodName()`
Returns the name of this method.
`Utf8Entry`
MethodModel.`methodType()`
Returns the method descriptor string of this method.
`Utf8Entry`
AnnotationElement.`name()`
Returns the element name.
Methods in java.lang.classfile that return types with arguments of type Utf8Entry
Modifier and Type
Method
Description
`Function<Utf8Entry, AttributeMapper<?>>`
ClassFile.AttributeMapperOption.`attributeMapper()`
Returns the function mapping attribute names to attribute mappers.
`Function<Utf8Entry, AttributeMapper<?>>`
ClassReader.`customAttributes()`
Returns the table of custom attribute mappers.
Methods in java.lang.classfile with parameters of type Utf8Entry
Modifier and Type
Method
Description
`default CodeBuilder`
CodeBuilder.`localVariable(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope)`
Declares a local variable entry.
`default CodeBuilder`
CodeBuilder.`localVariableType(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope)`
Declares a local variable type entry.
`static Annotation`
Annotation.`of(Utf8Entry annotationClass, AnnotationElement... elements)`
Returns an annotation.
`static Annotation`
Annotation.`of(Utf8Entry annotationClass, List<AnnotationElement> elements)`
Returns an annotation.
`static AnnotationElement`
AnnotationElement.`of(Utf8Entry name, AnnotationValue value)`
Returns an element-value pair.
`static AnnotationValue.OfClass`
AnnotationValue.`ofClass(Utf8Entry className)`
Returns a class value for an element-value pair.
`static AnnotationValue.OfEnum`
AnnotationValue.`ofEnum(Utf8Entry className, Utf8Entry constantName)`
Returns an enum value for an element-value pair.
`static AnnotationValue.OfString`
AnnotationValue.`ofString(Utf8Entry value)`
Returns a string value for an element-value pair.
`default ClassBuilder`
ClassBuilder.`withField(Utf8Entry name, Utf8Entry descriptor, int flags)`
Adds a field, with only access flags.
`ClassBuilder`
ClassBuilder.`withField(Utf8Entry name, Utf8Entry descriptor, Consumer<? super FieldBuilder> handler)`
Adds a field.
`ClassBuilder`
ClassBuilder.`withMethod(Utf8Entry name, Utf8Entry descriptor, int methodFlags, Consumer<? super MethodBuilder> handler)`
Adds a method.
`default ClassBuilder`
ClassBuilder.`withMethodBody(Utf8Entry name, Utf8Entry descriptor, int methodFlags, Consumer<? super CodeBuilder> handler)`
Adds a method, with only access flags and a `CodeModel`.
Method parameters in java.lang.classfile with type arguments of type Utf8Entry
Modifier and Type
Method
Description
`static ClassFile.AttributeMapperOption`
ClassFile.AttributeMapperOption.`of(Function<Utf8Entry, AttributeMapper<?>> attributeMapper)`
Returns an option describing user-defined attributes for parsing.

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

Methods in java.lang.classfile.attribute that return Utf8Entry
Modifier and Type
Method
Description
`Utf8Entry`
ModuleHashesAttribute.`algorithm()`
Returns the algorithm name used to compute the hash.
`Utf8Entry`
CompilationIDAttribute.`compilationId()`
Returns the compilation ID.
`Utf8Entry`
RecordComponentInfo.`descriptor()`
Returns the field descriptor string of this component.
`Utf8Entry`
LocalVariableInfo.`name()`
Returns the name of the local variable.
`Utf8Entry`
LocalVariableTypeInfo.`name()`
Returns the name of the local variable.
`Utf8Entry`
RecordComponentInfo.`name()`
Returns the name of this component.
`Utf8Entry`
LocalVariableTypeInfo.`signature()`
Returns the field signature string of the local variable.
`Utf8Entry`
SignatureAttribute.`signature()`
Returns the signature string for the class, method, field, or record component.
`Utf8Entry`
SourceFileAttribute.`sourceFile()`
Returns the name of the source file from which this class was compiled.
`Utf8Entry`
SourceIDAttribute.`sourceId()`
Returns the source id.
`Utf8Entry`
ModuleTargetAttribute.`targetPlatform()`
Returns the target platform.
`Utf8Entry`
LocalVariableInfo.`type()`
Returns the field descriptor string of the local variable.
Methods in java.lang.classfile.attribute that return types with arguments of type Utf8Entry
Modifier and Type
Method
Description
`default Optional<Utf8Entry>`
EnclosingMethodAttribute.`enclosingMethodName()`
Returns the name of the enclosing method, if the class is immediately enclosed by exactly one method or constructor.
`default Optional<Utf8Entry>`
EnclosingMethodAttribute.`enclosingMethodType()`
Returns the name of the enclosing method, if the class is immediately enclosed by exactly one method or constructor.
`Optional<Utf8Entry>`
InnerClassInfo.`innerName()`
Returns the simple name of this class, or empty if this class is anonymous.
`Optional<Utf8Entry>`
ModuleAttribute.`moduleVersion()`
Returns the version of the module, if present.
`Optional<Utf8Entry>`
MethodParameterInfo.`name()`
Returns the parameter name, if it has one.
`Optional<Utf8Entry>`
ModuleRequireInfo.`requiresVersion()`
Returns the required version of the required module, if present.
Methods in java.lang.classfile.attribute with parameters of type Utf8Entry
Modifier and Type
Method
Description
`static CompilationIDAttribute`
CompilationIDAttribute.`of(Utf8Entry id)`
Returns a `CompilationID` attribute.
`static ModuleAttribute`
ModuleAttribute.`of(ModuleEntry moduleName, int moduleFlags, Utf8Entry moduleVersion, Collection<ModuleRequireInfo> requires, Collection<ModuleExportInfo> exports, Collection<ModuleOpenInfo> opens, Collection<ClassEntry> uses, Collection<ModuleProvideInfo> provides)`
Returns a `Module` attribute.
`static ModuleHashesAttribute`
ModuleHashesAttribute.`of(Utf8Entry algorithm, ModuleHashInfo... hashes)`
Returns a `ModuleHashes` attribute.
`static ModuleHashesAttribute`
ModuleHashesAttribute.`of(Utf8Entry algorithm, List<ModuleHashInfo> hashes)`
Returns a `ModuleHashes` attribute.
`static ModuleRequireInfo`
ModuleRequireInfo.`of(ModuleEntry requires, int requiresFlags, Utf8Entry requiresVersion)`
Returns a module requirement description.
`static ModuleRequireInfo`
ModuleRequireInfo.`of(ModuleEntry requires, Collection<AccessFlag> requiresFlags, Utf8Entry requiresVersion)`
Returns a module requirement description.
`static ModuleTargetAttribute`
ModuleTargetAttribute.`of(Utf8Entry targetPlatform)`
Returns a `ModuleTarget` attribute.
`static RecordComponentInfo`
RecordComponentInfo.`of(Utf8Entry name, Utf8Entry descriptor, Attribute<?>... attributes)`
Returns a record component description.
`static RecordComponentInfo`
RecordComponentInfo.`of(Utf8Entry name, Utf8Entry descriptor, List<Attribute<?>> attributes)`
Returns a record component description.
`static SignatureAttribute`
SignatureAttribute.`of(Utf8Entry signature)`
Returns a `Signature` attribute.
`static SourceFileAttribute`
SourceFileAttribute.`of(Utf8Entry sourceFile)`
Returns a source file attribute.
`static SourceIDAttribute`
SourceIDAttribute.`of(Utf8Entry sourceId)`
Returns a `SourceID` attribute.
Method parameters in java.lang.classfile.attribute with type arguments of type Utf8Entry
Modifier and Type
Method
Description
`static MethodParameterInfo`
MethodParameterInfo.`of(Optional<Utf8Entry> name, int flags)`
Returns a method parameter description.

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

Methods in java.lang.classfile.constantpool that return Utf8Entry
Modifier and Type
Method
Description
`Utf8Entry`
MethodTypeEntry.`descriptor()`
Returns the method descriptor string.
`Utf8Entry`
ClassEntry.`name()`
Returns the `Utf8Entry` referred by this structure.
`default Utf8Entry`
DynamicConstantPoolEntry.`name()`
Returns the name indicated by this symbolic reference.
`default Utf8Entry`
MemberRefEntry.`name()`
Returns the name of the member.
`Utf8Entry`
ModuleEntry.`name()`
Returns the name of the module.
`Utf8Entry`
NameAndTypeEntry.`name()`
Returns the field or method name.
`Utf8Entry`
PackageEntry.`name()`
Returns the internal form of the package name.
`default Utf8Entry`
DynamicConstantPoolEntry.`type()`
Returns the descriptor string indicated by this symbolic reference.
`default Utf8Entry`
MemberRefEntry.`type()`
Returns the descriptor string of the member.
`Utf8Entry`
NameAndTypeEntry.`type()`
Returns the field or method descriptor string.
`Utf8Entry`
StringEntry.`utf8()`
Returns the UTF constant pool entry describing the string contents.
`default Utf8Entry`
ConstantPoolBuilder.`utf8Entry(ClassDesc desc)`
Returns a `Utf8Entry` describing the field descriptor string of the provided `ClassDesc`.
`default Utf8Entry`
ConstantPoolBuilder.`utf8Entry(MethodTypeDesc desc)`
Returns a `Utf8Entry` describing the method descriptor string of the provided `MethodTypeDesc`.
`Utf8Entry`
ConstantPoolBuilder.`utf8Entry(String s)`
Returns a `Utf8Entry` describing the provided `String`.
Methods in java.lang.classfile.constantpool with parameters of type Utf8Entry
Modifier and Type
Method
Description
`ClassEntry`
ConstantPoolBuilder.`classEntry(Utf8Entry ne)`
Returns a `ClassEntry` referring to the provided `Utf8Entry`.
`MethodTypeEntry`
ConstantPoolBuilder.`methodTypeEntry(Utf8Entry descriptor)`
Returns a `MethodTypeEntry` referring to a `Utf8Entry`.
`ModuleEntry`
ConstantPoolBuilder.`moduleEntry(Utf8Entry moduleName)`
Returns a `ModuleEntry` referring to the provided `Utf8Entry`.
`NameAndTypeEntry`
ConstantPoolBuilder.`nameAndTypeEntry(Utf8Entry nameEntry, Utf8Entry typeEntry)`
Returns a `NameAndTypeEntry` referring to the provided name and type `Utf8Entry`.
`PackageEntry`
ConstantPoolBuilder.`packageEntry(Utf8Entry nameEntry)`
Returns a `PackageEntry` referring to the provided `Utf8Entry`.
`StringEntry`
ConstantPoolBuilder.`stringEntry(Utf8Entry utf8)`
Returns a `StringEntry` referring to a `Utf8Entry`.

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

Methods in java.lang.classfile.instruction that return Utf8Entry
Modifier and Type
Method
Description
`default Utf8Entry`
FieldInstruction.`name()`
Returns the name of the field.
`default Utf8Entry`
InvokeDynamicInstruction.`name()`
Returns the invocation name of the call site.
`default Utf8Entry`
InvokeInstruction.`name()`
Returns the name of the method.
`Utf8Entry`
LocalVariable.`name()`
Returns the local variable name.
`Utf8Entry`
LocalVariableType.`name()`
Returns the local variable name.
`Utf8Entry`
LocalVariableType.`signature()`
Returns the local variable generic signature string.
`default Utf8Entry`
FieldInstruction.`type()`
Returns the field descriptor string of the field.
`default Utf8Entry`
InvokeDynamicInstruction.`type()`
Returns the invocation type of the call site.
`default Utf8Entry`
InvokeInstruction.`type()`
Returns the method descriptor string of the method.
`Utf8Entry`
LocalVariable.`type()`
Returns the local variable field descriptor string.
Methods in java.lang.classfile.instruction with parameters of type Utf8Entry
Modifier and Type
Method
Description
`static FieldInstruction`
FieldInstruction.`of(Opcode op, ClassEntry owner, Utf8Entry name, Utf8Entry type)`
Returns a field access instruction.
`static InvokeInstruction`
InvokeInstruction.`of(Opcode op, ClassEntry owner, Utf8Entry name, Utf8Entry type, boolean isInterface)`
Returns an invocation instruction.
`static LocalVariable`
LocalVariable.`of(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope)`
Returns a local variable pseudo-instruction.
`static LocalVariableType`
LocalVariableType.`of(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope)`
Returns a local variable type pseudo-instruction.