Module java.base

# Package java.lang.classfile.attribute

package java.lang.classfile.attribute
`java.lang.classfile.attribute` is a preview API of the Java platform.
Programs can only use `java.lang.classfile.attribute` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.

## Provides interfaces describing classfile attributes for the `java.lang.classfile`PREVIEW library.

The `java.lang.classfile.attribute` package contains interfaces describing classfile attributes.

Since:
  22

- Related Packages
  Package
  Description
  java.lang.classfilePREVIEW
  Preview.
  Provides classfile parsing, generation, and transformation library.
  java.lang.classfile.componentsPREVIEW
  Preview.
  Provides specific components, transformations, and tools built on top of the `java.lang.classfile`PREVIEW library.
  java.lang.classfile.constantpoolPREVIEW
  Preview.
  Provides interfaces describing classfile constant pool entries for the `java.lang.classfile`PREVIEW library.
  java.lang.classfile.instructionPREVIEW
  Preview.
  Provides interfaces describing code instructions for the `java.lang.classfile`PREVIEW library.
- Class
  Description
  AnnotationDefaultAttributePREVIEW
  Preview.
  Models the `AnnotationDefault` attribute 4.7.22, which can appear on methods of annotation types, and records the default value 9.6.2 for the element corresponding to this method.
  BootstrapMethodsAttributePREVIEW
  Preview.
  Models the `BootstrapMethods` attribute 4.7.23, which serves as an extension to the constant pool of a classfile.
  CharacterRangeInfoPREVIEW
  Preview.
  Models a single character range in the `CharacterRangeTableAttribute`PREVIEW.
  CharacterRangeTableAttributePREVIEW
  Preview.
  The CharacterRangeTable attribute is an optional variable-length attribute in the attributes table of a `Code` attribute.
  CodeAttributePREVIEW
  Preview.
  Models the `Code` attribute 4.7.3, appears on non-native, non-abstract methods and contains the bytecode of the method body.
  CompilationIDAttributePREVIEW
  Preview.
  Models the `CompilationID` attribute (@@@ need reference), which can appear on classes and records the compilation time of the class.
  ConstantValueAttributePREVIEW
  Preview.
  Models the `ConstantValue` attribute 4.7.2, which can appear on fields and indicates that the field's value is a constant.
  DeprecatedAttributePREVIEW
  Preview.
  Models the `Deprecated` attribute 4.7.15, which can appear on classes, methods, and fields.
  EnclosingMethodAttributePREVIEW
  Preview.
  Models the `EnclosingMethod` attribute 4.7.7, which can appear on classes, and indicates that the class is a local or anonymous class.
  ExceptionsAttributePREVIEW
  Preview.
  Models the `Exceptions` attribute 4.7.5, which can appear on methods, and records the exceptions declared to be thrown by this method.
  InnerClassesAttributePREVIEW
  Preview.
  Models the `InnerClasses` attribute 4.7.6, which can appear on classes, and records which classes referenced by this classfile are inner classes.
  InnerClassInfoPREVIEW
  Preview.
  Models a single inner class in the `InnerClassesAttribute`PREVIEW.
  LineNumberInfoPREVIEW
  Preview.
  Models a single line number in the `LineNumberTableAttribute`PREVIEW.
  LineNumberTableAttributePREVIEW
  Preview.
  Models the `LineNumberTable` attribute 4.7.12, which can appear on a `Code` attribute, and records the mapping between indexes into the code table and line numbers in the source file.
  LocalVariableInfoPREVIEW
  Preview.
  Models a single local variable in the `LocalVariableTableAttribute`PREVIEW.
  LocalVariableTableAttributePREVIEW
  Preview.
  Models the `LocalVariableTable` attribute 4.7.13, which can appear on a `Code` attribute, and records debug information about local variables.
  LocalVariableTypeInfoPREVIEW
  Preview.
  Models a single local variable in the `LocalVariableTypeTableAttribute`PREVIEW.
  LocalVariableTypeTableAttributePREVIEW
  Preview.
  Models the `LocalVariableTypeTable` attribute 4.7.14, which can appear on a `Code` attribute, and records debug information about local variables.
  MethodParameterInfoPREVIEW
  Preview.
  Models a single method parameter in the `MethodParametersAttribute`PREVIEW.
  MethodParametersAttributePREVIEW
  Preview.
  Models the `MethodParameters` attribute 4.7.24, which can appear on methods, and records optional information about the method's parameters.
  ModuleAttributePREVIEW
  Preview.
  Models the `Module` attribute 4.7.25, which can appear on classes that represent module descriptors.
  ModuleAttribute.ModuleAttributeBuilderPREVIEW
  Preview.
  A builder for module attributes.
  ModuleExportInfoPREVIEW
  Preview.
  Models a single "exports" declaration in the `ModuleAttribute`PREVIEW.
  ModuleHashesAttributePREVIEW
  Preview.
  Models the `ModuleHashes` attribute, which can appear on classes that represent module descriptors.
  ModuleHashInfoPREVIEW
  Preview.
  Models hash information for a single module in the `ModuleHashesAttribute`PREVIEW.
  ModuleMainClassAttributePREVIEW
  Preview.
  Models the `ModuleMainClass` attribute 4.7.27, which can appear on classes that represent module descriptors.
  ModuleOpenInfoPREVIEW
  Preview.
  Models a single "opens" declaration in the `ModuleAttribute`PREVIEW.
  ModulePackagesAttributePREVIEW
  Preview.
  Models the `ModulePackages` attribute 4.7.26, which can appear on classes that represent module descriptors.
  ModuleProvideInfoPREVIEW
  Preview.
  Models a single "provides" declaration in the `ModuleAttribute`PREVIEW.
  ModuleRequireInfoPREVIEW
  Preview.
  Models a single "requires" declaration in the `ModuleAttribute`PREVIEW.
  ModuleResolutionAttributePREVIEW
  Preview.
  Models the `ModuleResolution` attribute, which can appear on classes that represent module descriptors.
  ModuleTargetAttributePREVIEW
  Preview.
  Models the `ModuleTarget` attribute, which can appear on classes that represent module descriptors.
  NestHostAttributePREVIEW
  Preview.
  Models the `NestHost` attribute 4.7.28, which can appear on classes to indicate that this class is a member of a nest.
  NestMembersAttributePREVIEW
  Preview.
  Models the `NestMembers` attribute 4.7.29, which can appear on classes to indicate that this class is the host of a nest.
  PermittedSubclassesAttributePREVIEW
  Preview.
  Models the `PermittedSubclasses` attribute 4.7.31, which can appear on classes to indicate which classes may extend this class.
  RecordAttributePREVIEW
  Preview.
  Models the `Record` attribute 4.7.30, which can appear on classes to indicate that this class is a record class.
  RecordComponentInfoPREVIEW
  Preview.
  Models a single record component in the `RecordAttribute`PREVIEW.
  RuntimeInvisibleAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeInvisibleAnnotations` attribute 4.7.17, which can appear on classes, methods, and fields.
  RuntimeInvisibleParameterAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeInvisibleParameterAnnotations` attribute 4.7.19, which can appear on methods.
  RuntimeInvisibleTypeAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeInvisibleTypeAnnotations` attribute 4.7.21, which can appear on classes, methods, fields, and code attributes.
  RuntimeVisibleAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeVisibleAnnotations` attribute 4.7.16, which can appear on classes, methods, and fields.
  RuntimeVisibleParameterAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeVisibleParameterAnnotations` attribute 4.7.18, which can appear on methods.
  RuntimeVisibleTypeAnnotationsAttributePREVIEW
  Preview.
  Models the `RuntimeVisibleTypeAnnotations` attribute 4.7.20, which can appear on classes, methods, fields, and code attributes.
  SignatureAttributePREVIEW
  Preview.
  Models the `Signature` attribute 4.7.9, which can appear on classes, methods, or fields.
  SourceDebugExtensionAttributePREVIEW
  Preview.
  Models the `SourceDebugExtension` attribute.
  SourceFileAttributePREVIEW
  Preview.
  Models the `SourceFile` attribute 4.7.10, which can appear on classes.
  SourceIDAttributePREVIEW
  Preview.
  Models the `SourceID` attribute, which can appear on classes.
  StackMapFrameInfoPREVIEW
  Preview.
  Models stack map frame of `StackMapTable` attribute 4.7.4.
  StackMapFrameInfo.ObjectVerificationTypeInfoPREVIEW
  Preview.
  A stack value for an object type.
  StackMapFrameInfo.SimpleVerificationTypeInfoPREVIEW
  Preview.
  A simple stack value.
  StackMapFrameInfo.UninitializedVerificationTypeInfoPREVIEW
  Preview.
  An uninitialized stack value.
  StackMapFrameInfo.VerificationTypeInfoPREVIEW
  Preview.
  The type of a stack value.
  StackMapTableAttributePREVIEW
  Preview.
  Models the `StackMapTable` attribute 4.7.4, which can appear on a `Code` attribute.
  SyntheticAttributePREVIEW
  Preview.
  Models the `Synthetic` attribute 4.7.8, which can appear on classes, methods, and fields.
  UnknownAttributePREVIEW
  Preview.
  Models an unknown attribute on a class, method, or field.