Interface Attribute<A extends Attribute<A>>

Type Parameters:
A - the attribute type
All Superinterfaces:
ClassFileElement
All Known Subinterfaces:
AnnotationDefaultAttribute, BootstrapMethodsAttribute, CharacterRangeTableAttribute, CodeAttribute, CompilationIDAttribute, ConstantValueAttribute, DeprecatedAttribute, EnclosingMethodAttribute, ExceptionsAttribute, InnerClassesAttribute, LineNumberTableAttribute, LocalVariableTableAttribute, LocalVariableTypeTableAttribute, MethodParametersAttribute, ModuleAttribute, ModuleHashesAttribute, ModuleMainClassAttribute, ModulePackagesAttribute, ModuleResolutionAttribute, ModuleTargetAttribute, NestHostAttribute, NestMembersAttribute, PermittedSubclassesAttribute, RecordAttribute, RuntimeInvisibleAnnotationsAttribute, RuntimeInvisibleParameterAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, RuntimeVisibleAnnotationsAttribute, RuntimeVisibleParameterAnnotationsAttribute, RuntimeVisibleTypeAnnotationsAttribute, SignatureAttribute, SourceDebugExtensionAttribute, SourceFileAttribute, SourceIDAttribute, StackMapTableAttribute, SyntheticAttribute, UnknownAttribute
All Known Implementing Classes:
CustomAttribute

Models an attribute (JVMS 4.7) in the class file format. Attributes exist on certain class file structures modeled by AttributedElement, which provides basic read access to the attributes.

This sealed interface hierarchy includes attributes predefined in the JVMS and JDK-specific nonstandard attributes. Their mappers are available in Attributes. Two special subtypes of Attribute are CustomAttribute, which all user-defined attributes should extend from, and UnknownAttribute, representing attributes read from class file but are not recognized by the ClassFile.AttributeMapperOption.

Attributes are read through AttributedElement or element traversal of a CompoundElement; they are written through ClassFileBuilder. See Reading Attributes and Writing Attributes for more details.

See Java Virtual Machine Specification:
4.7 Attributes
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for AttributeSealed class hierarchy graph for Attribute
Since:
24
See Also:
  • Method Details