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

Packages that use Utf8EntryPREVIEW
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.attribute
Provides interfaces describing classfile attributes for the `java.lang.classfile`PREVIEW library.
java.lang.classfile.constantpool
Provides interfaces describing classfile constant pool entries for the `java.lang.classfile`PREVIEW library.
java.lang.classfile.instruction
Provides interfaces describing code instructions for the `java.lang.classfile`PREVIEW library.

- ## Uses of Utf8EntryPREVIEW in java.lang.classfilePREVIEW

  Methods in java.lang.classfilePREVIEW that return Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `Utf8EntryPREVIEW`
  Annotation.`className()`
  Returns the class of the annotation.
  `Utf8EntryPREVIEW`
  AnnotationValue.OfClass.`className()`
  Returns the class name.
  `Utf8EntryPREVIEW`
  AnnotationValue.OfEnum.`className()`
  Returns the enum class name.
  `Utf8EntryPREVIEW`
  AnnotationValue.OfEnum.`constantName()`
  Returns the enum constant name.
  `Utf8EntryPREVIEW`
  FieldModel.`fieldName()`
  Returns the name of this field.
  `Utf8EntryPREVIEW`
  FieldModel.`fieldType()`
  Returns the field descriptor of this field.
  `Utf8EntryPREVIEW`
  MethodModel.`methodName()`
  Returns the name of this method.
  `Utf8EntryPREVIEW`
  MethodModel.`methodType()`
  Returns the method descriptor of this method.
  `Utf8EntryPREVIEW`
  AnnotationElement.`name()`
  Returns the element name.
  `Utf8EntryPREVIEW`
  ClassReader.`readUtf8Entry(int offset)`
  Returns the UTF8 entry whose index is given at the specified offset within the classfile.
  `Utf8EntryPREVIEW`
  ClassReader.`readUtf8EntryOrNull(int offset)`
  Returns the UTF8 entry whose index is given at the specified offset within the classfile, or null if the index at the specified offset is zero.
  `Utf8EntryPREVIEW`
  ClassReader.`utf8EntryByIndex(int index)`
  Returns the UTF8 constant pool entry at the given index of the constant pool.
  Methods in java.lang.classfilePREVIEW that return types with arguments of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>>`
  ClassFile.AttributeMapperOption.`attributeMapper()`
  Returns the function mapping attribute names to attribute mappers.
  `Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>>`
  ClassReader.`customAttributes()`
  Returns the table of custom attribute mappers.
  Methods in java.lang.classfilePREVIEW with parameters of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `default CodeBuilderPREVIEW`
  CodeBuilder.`localVariable(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW descriptorEntry, LabelPREVIEW startScope, LabelPREVIEW endScope)`
  Declare a local variable entry
  `default CodeBuilderPREVIEW`
  CodeBuilder.`localVariableType(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW signatureEntry, LabelPREVIEW startScope, LabelPREVIEW endScope)`
  Declare a local variable type entry
  `static AnnotationPREVIEW`
  Annotation.`of(Utf8EntryPREVIEW annotationClass, AnnotationElementPREVIEW... elements)`
  Returns an annotation.
  `static AnnotationPREVIEW`
  Annotation.`of(Utf8EntryPREVIEW annotationClass, List<AnnotationElementPREVIEW> elements)`
  Returns an annotation.
  `static AnnotationElementPREVIEW`
  AnnotationElement.`of(Utf8EntryPREVIEW name, AnnotationValuePREVIEW value)`
  Returns an annotation key-value pair.
  `static TypeAnnotationPREVIEW`
  TypeAnnotation.`of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, Utf8EntryPREVIEW annotationClassUtf8Entry, AnnotationElementPREVIEW... annotationElements)`
  Returns a type annotation.
  `static TypeAnnotationPREVIEW`
  TypeAnnotation.`of(TypeAnnotation.TargetInfoPREVIEW targetInfo, List<TypeAnnotation.TypePathComponentPREVIEW> targetPath, Utf8EntryPREVIEW annotationClassUtf8Entry, List<AnnotationElementPREVIEW> annotationElements)`
  Returns a type annotation.
  `static AnnotationValue.OfClassPREVIEW`
  AnnotationValue.`ofClass(Utf8EntryPREVIEW className)`
  Returns an annotation element for a class-valued element.
  `static AnnotationValue.OfEnumPREVIEW`
  AnnotationValue.`ofEnum(Utf8EntryPREVIEW className, Utf8EntryPREVIEW constantName)`
  Returns an annotation element for a enum-valued element.
  `static AnnotationValue.OfConstantPREVIEW`
  AnnotationValue.`ofString(Utf8EntryPREVIEW value)`
  Returns an annotation element for a string-valued element.
  `static AttributeMapperPREVIEW<?>`
  Attributes.`standardAttribute(Utf8EntryPREVIEW name)`
  Returns the attribute mapper for a standard attribute.
  `default ClassBuilderPREVIEW`
  ClassBuilder.`withField(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, int flags)`
  Adds a field.
  `ClassBuilderPREVIEW`
  ClassBuilder.`withField(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, Consumer<? super FieldBuilderPREVIEW> handler)`
  Adds a field.
  `ClassBuilderPREVIEW`
  ClassBuilder.`withMethod(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, int methodFlags, Consumer<? super MethodBuilderPREVIEW> handler)`
  Adds a method.
  `default ClassBuilderPREVIEW`
  ClassBuilder.`withMethodBody(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, int methodFlags, Consumer<? super CodeBuilderPREVIEW> handler)`
  Adds a method, with only a `Code` attribute.
  Method parameters in java.lang.classfilePREVIEW with type arguments of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `static ClassFile.AttributeMapperOptionPREVIEW`
  ClassFile.AttributeMapperOption.`of(Function<Utf8EntryPREVIEW,AttributeMapperPREVIEW<?>> attributeMapper)`
  Returns an option describing attribute mappers for custom attributes.

- ## Uses of Utf8EntryPREVIEW in java.lang.classfile.attributePREVIEW

  Methods in java.lang.classfile.attributePREVIEW that return Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `Utf8EntryPREVIEW`
  ModuleHashesAttribute.`algorithm()`
  Returns the algorithm name used to compute the hash.
  `Utf8EntryPREVIEW`
  CompilationIDAttribute.`compilationId()`
  Returns the compilation ID.
  `Utf8EntryPREVIEW`
  RecordComponentInfo.`descriptor()`
  Returns the field descriptor of this component.
  `Utf8EntryPREVIEW`
  LocalVariableInfo.`name()`
  Returns the name of the local variable.
  `Utf8EntryPREVIEW`
  LocalVariableTypeInfo.`name()`
  Returns the name of the local variable.
  `Utf8EntryPREVIEW`
  RecordComponentInfo.`name()`
  Returns the name of this component.
  `Utf8EntryPREVIEW`
  LocalVariableTypeInfo.`signature()`
  Returns the field signature of the local variable.
  `Utf8EntryPREVIEW`
  SignatureAttribute.`signature()`
  Returns the signature for the class, method, or field.
  `Utf8EntryPREVIEW`
  SourceFileAttribute.`sourceFile()`
  Returns the name of the source file from which this class was compiled.
  `Utf8EntryPREVIEW`
  SourceIDAttribute.`sourceId()`
  Returns the source id.
  `Utf8EntryPREVIEW`
  ModuleTargetAttribute.`targetPlatform()`
  Returns the target platform.
  `Utf8EntryPREVIEW`
  LocalVariableInfo.`type()`
  Returns the field descriptor of the local variable.
  Methods in java.lang.classfile.attributePREVIEW that return types with arguments of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `default Optional<Utf8EntryPREVIEW>`
  EnclosingMethodAttribute.`enclosingMethodName()`
  Returns the name of the enclosing method, if the class is immediately enclosed by a method or constructor.
  `default Optional<Utf8EntryPREVIEW>`
  EnclosingMethodAttribute.`enclosingMethodType()`
  Returns the type of the enclosing method, if the class is immediately enclosed by a method or constructor.
  `Optional<Utf8EntryPREVIEW>`
  InnerClassInfo.`innerName()`
  Returns the simple name of this class, or empty if this class is anonymous.
  `Optional<Utf8EntryPREVIEW>`
  ModuleAttribute.`moduleVersion()`
  Returns the version of the module, if present.
  `Optional<Utf8EntryPREVIEW>`
  MethodParameterInfo.`name()`
  The name of the method parameter, if there is one.
  `Optional<Utf8EntryPREVIEW>`
  ModuleRequireInfo.`requiresVersion()`
  Returns the required version of the required module, if present.
  Methods in java.lang.classfile.attributePREVIEW with parameters of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `static CompilationIDAttributePREVIEW`
  CompilationIDAttribute.`of(Utf8EntryPREVIEW id)`
  Returns a `CompilationID` attribute.
  `static ModuleAttributePREVIEW`
  ModuleAttribute.`of(ModuleEntryPREVIEW moduleName, int moduleFlags, Utf8EntryPREVIEW moduleVersion, Collection<ModuleRequireInfoPREVIEW> requires, Collection<ModuleExportInfoPREVIEW> exports, Collection<ModuleOpenInfoPREVIEW> opens, Collection<ClassEntryPREVIEW> uses, Collection<ModuleProvideInfoPREVIEW> provides)`
  Returns a `Module` attribute.
  `static ModuleHashesAttributePREVIEW`
  ModuleHashesAttribute.`of(Utf8EntryPREVIEW algorithm, ModuleHashInfoPREVIEW... hashes)`
  Returns a `ModuleHashes` attribute.
  `static ModuleHashesAttributePREVIEW`
  ModuleHashesAttribute.`of(Utf8EntryPREVIEW algorithm, List<ModuleHashInfoPREVIEW> hashes)`
  Returns a `ModuleHashes` attribute.
  `static ModuleRequireInfoPREVIEW`
  ModuleRequireInfo.`of(ModuleEntryPREVIEW requires, int requiresFlags, Utf8EntryPREVIEW requiresVersion)`
  Returns a module requirement description.
  `static ModuleRequireInfoPREVIEW`
  ModuleRequireInfo.`of(ModuleEntryPREVIEW requires, Collection<AccessFlag> requiresFlags, Utf8EntryPREVIEW requiresVersion)`
  Returns a module requirement description.
  `static ModuleTargetAttributePREVIEW`
  ModuleTargetAttribute.`of(Utf8EntryPREVIEW targetPlatform)`
  Returns a `ModuleTarget` attribute.
  `static RecordComponentInfoPREVIEW`
  RecordComponentInfo.`of(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, AttributePREVIEW<?>... attributes)`
  Returns a record component description.
  `static RecordComponentInfoPREVIEW`
  RecordComponentInfo.`of(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, List<AttributePREVIEW<?>> attributes)`
  Returns a record component description.
  `static SignatureAttributePREVIEW`
  SignatureAttribute.`of(Utf8EntryPREVIEW signature)`
  Returns a `Signature` attribute.
  `static SourceFileAttributePREVIEW`
  SourceFileAttribute.`of(Utf8EntryPREVIEW sourceFile)`
  Returns a source file attribute.
  `static SourceIDAttributePREVIEW`
  SourceIDAttribute.`of(Utf8EntryPREVIEW sourceId)`
  Returns a `SourceID` attribute.
  Method parameters in java.lang.classfile.attributePREVIEW with type arguments of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `static MethodParameterInfoPREVIEW`
  MethodParameterInfo.`of(Optional<Utf8EntryPREVIEW> name, int flags)`
  Returns a method parameter description.

- ## Uses of Utf8EntryPREVIEW in java.lang.classfile.constantpoolPREVIEW

  Methods in java.lang.classfile.constantpoolPREVIEW that return Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `Utf8EntryPREVIEW`
  MethodTypeEntry.`descriptor()`
  Returns the constant pool entry describing the method type.
  `Utf8EntryPREVIEW`
  ClassEntry.`name()`
  Returns the UTF8 constant pool entry for the class name.
  `default Utf8EntryPREVIEW`
  DynamicConstantPoolEntry.`name()`
  Returns the invocation name.
  `default Utf8EntryPREVIEW`
  MemberRefEntry.`name()`
  Returns the name of the member.
  `Utf8EntryPREVIEW`
  ModuleEntry.`name()`
  Returns the name of the module.
  `Utf8EntryPREVIEW`
  NameAndTypeEntry.`name()`
  Returns the field or method name.
  `Utf8EntryPREVIEW`
  PackageEntry.`name()`
  Returns the package name.
  `default Utf8EntryPREVIEW`
  DynamicConstantPoolEntry.`type()`
  Returns the invocation type.
  `default Utf8EntryPREVIEW`
  MemberRefEntry.`type()`
  Returns the type of the member.
  `Utf8EntryPREVIEW`
  NameAndTypeEntry.`type()`
  Returns the field or method descriptor.
  `Utf8EntryPREVIEW`
  StringEntry.`utf8()`
  Returns the UTF constant pool entry describing the string contents.
  `default Utf8EntryPREVIEW`
  ConstantPoolBuilder.`utf8Entry(ClassDesc desc)`
  Returns A `Utf8Entry`PREVIEW describing the field descriptor of the provided ClassDesc.
  `default Utf8EntryPREVIEW`
  ConstantPoolBuilder.`utf8Entry(MethodTypeDesc desc)`
  Returns A `Utf8Entry`PREVIEW describing the method descriptor of the provided MethodTypeDesc.
  `Utf8EntryPREVIEW`
  ConstantPoolBuilder.`utf8Entry(String s)`
  Returns A `Utf8Entry`PREVIEW describing the provided String.
  Methods in java.lang.classfile.constantpoolPREVIEW with parameters of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `ClassEntryPREVIEW`
  ConstantPoolBuilder.`classEntry(Utf8EntryPREVIEW ne)`
  Returns A `ClassEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW.
  `MethodTypeEntryPREVIEW`
  ConstantPoolBuilder.`methodTypeEntry(Utf8EntryPREVIEW descriptor)`
  Returns A `MethodTypeEntry`PREVIEW describing a method type.
  `ModuleEntryPREVIEW`
  ConstantPoolBuilder.`moduleEntry(Utf8EntryPREVIEW moduleName)`
  Returns A `ModuleEntry`PREVIEW describing the module whose name is encoded in the provided Utf8EntryPREVIEW.
  `NameAndTypeEntryPREVIEW`
  ConstantPoolBuilder.`nameAndTypeEntry(Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW typeEntry)`
  Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type.
  `PackageEntryPREVIEW`
  ConstantPoolBuilder.`packageEntry(Utf8EntryPREVIEW nameEntry)`
  Returns A `PackageEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW.
  `StringEntryPREVIEW`
  ConstantPoolBuilder.`stringEntry(Utf8EntryPREVIEW utf8)`
  Returns A `StringEntry`PREVIEW referencing the provided UTF8 entry.

- ## Uses of Utf8EntryPREVIEW in java.lang.classfile.instructionPREVIEW

  Methods in java.lang.classfile.instructionPREVIEW that return Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `default Utf8EntryPREVIEW`
  FieldInstruction.`name()`
  Returns the name of the field.
  `default Utf8EntryPREVIEW`
  InvokeDynamicInstruction.`name()`
  Returns the invocation name of the call site.
  `default Utf8EntryPREVIEW`
  InvokeInstruction.`name()`
  Returns the name of the method.
  `Utf8EntryPREVIEW`
  LocalVariable.`name()`
  Returns the local variable name.
  `Utf8EntryPREVIEW`
  LocalVariableType.`name()`
  Returns the local variable name.
  `Utf8EntryPREVIEW`
  LocalVariableType.`signature()`
  Returns the local variable signature.
  `default Utf8EntryPREVIEW`
  FieldInstruction.`type()`
  Returns the field descriptor of the field.
  `default Utf8EntryPREVIEW`
  InvokeDynamicInstruction.`type()`
  Returns the invocation type of the call site.
  `default Utf8EntryPREVIEW`
  InvokeInstruction.`type()`
  Returns the method descriptor of the method.
  `Utf8EntryPREVIEW`
  LocalVariable.`type()`
  Returns the local variable field descriptor.
  Methods in java.lang.classfile.instructionPREVIEW with parameters of type Utf8EntryPREVIEW
  Modifier and Type
  Method
  Description
  `static FieldInstructionPREVIEW`
  FieldInstruction.`of(OpcodePREVIEW op, ClassEntryPREVIEW owner, Utf8EntryPREVIEW name, Utf8EntryPREVIEW type)`
  Returns a field access instruction.
  `static InvokeInstructionPREVIEW`
  InvokeInstruction.`of(OpcodePREVIEW op, ClassEntryPREVIEW owner, Utf8EntryPREVIEW name, Utf8EntryPREVIEW type, boolean isInterface)`
  Returns an invocation instruction.
  `static LocalVariablePREVIEW`
  LocalVariable.`of(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW descriptorEntry, LabelPREVIEW startScope, LabelPREVIEW endScope)`
  Returns a local variable pseudo-instruction.
  `static LocalVariableTypePREVIEW`
  LocalVariableType.`of(int slot, Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW signatureEntry, LabelPREVIEW startScope, LabelPREVIEW endScope)`
  Returns a local variable type pseudo-instruction.