Class Attributes
java.lang.Object
java.lang.classfile.Attributes
Attributes
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Attribute mappers for standard classfile attributes.
Unless otherwise specified, mappers returned by each method do not permit multiple attribute instances in a given location.
The most stable STATELESS
PREVIEW mappers are:
CP_REFS
PREVIEW stability are:
annotationDefault()
bootstrapMethods()
code()
compilationId()
constantValue()
enclosingMethod()
exceptions()
innerClasses()
methodParameters()
module()
moduleHashes()
moduleMainClass()
modulePackages()
moduleTarget()
nestHost()
nestMembers()
permittedSubclasses()
record()
runtimeInvisibleAnnotations()
runtimeInvisibleParameterAnnotations()
runtimeVisibleAnnotations()
runtimeVisibleParameterAnnotations()
signature()
sourceFile()
sourceId()
LABELS
PREVIEW stability are:
The UNSTABLE
PREVIEW mappers are:
- Since:
- 22
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
AnnotationDefaultstatic final String
BootstrapMethodsstatic final String
CharacterRangeTablestatic final String
Codestatic final String
CompilationIDstatic final String
ConstantValuestatic final String
Deprecatedstatic final String
EnclosingMethodstatic final String
Exceptionsstatic final String
InnerClassesstatic final String
LineNumberTablestatic final String
LocalVariableTablestatic final String
LocalVariableTypeTablestatic final String
MethodParametersstatic final String
Modulestatic final String
ModuleHashesstatic final String
ModuleMainClassstatic final String
ModulePackagesstatic final String
ModuleResolutionstatic final String
ModuleTargetstatic final String
NestHoststatic final String
NestMembersstatic final String
PermittedSubclassesstatic final String
Recordstatic final String
RuntimeInvisibleAnnotationsstatic final String
RuntimeInvisibleParameterAnnotationsstatic final String
RuntimeInvisibleTypeAnnotationsstatic final String
RuntimeVisibleAnnotationsstatic final String
RuntimeVisibleParameterAnnotationsstatic final String
RuntimeVisibleTypeAnnotationsstatic final String
Signaturestatic final String
SourceDebugExtensionstatic final String
SourceFilestatic final String
SourceIDstatic final String
StackMapTablestatic final String
Synthetic -
Method Summary
Modifier and TypeMethodDescriptionReturns Attribute mapper for theAnnotationDefault
attribute.Returns Attribute mapper for theBootstrapMethods
attribute.Returns Attribute mapper for theCharacterRangeTable
attribute.code()
Returns Attribute mapper for theCode
attribute.Returns Attribute mapper for theCompilationID
attribute.Returns Attribute mapper for theConstantValue
attribute.Returns Attribute mapper for theDeprecated
attribute.Returns Attribute mapper for theEnclosingMethod
attribute.Returns Attribute mapper for theExceptions
attribute.Returns Attribute mapper for theInnerClasses
attribute.Returns Attribute mapper for theLineNumberTable
attribute.Returns Attribute mapper for theLocalVariableTable
attribute.Returns Attribute mapper for theLocalVariableTypeTable
attribute.Returns Attribute mapper for theMethodParameters
attribute.module()
Returns Attribute mapper for theModule
attribute.Returns Attribute mapper for theModuleHashes
attribute.Returns Attribute mapper for theModuleMainClass
attribute.Returns Attribute mapper for theModulePackages
attribute.Returns Attribute mapper for theModuleResolution
attribute.Returns Attribute mapper for theModuleTarget
attribute.nestHost()
Returns Attribute mapper for theNestHost
attribute.Returns Attribute mapper for theNestMembers
attribute.Returns Attribute mapper for thePermittedSubclasses
attribute.record()
Returns Attribute mapper for theRecord
attribute.Returns Attribute mapper for theRuntimeInvisibleAnnotations
attribute.Returns Attribute mapper for theRuntimeInvisibleParameterAnnotations
attribute.Returns Attribute mapper for theRuntimeInvisibleTypeAnnotations
attribute.Returns Attribute mapper for theRuntimeVisibleAnnotations
attribute.Returns Attribute mapper for theRuntimeVisibleParameterAnnotations
attribute.Returns Attribute mapper for theRuntimeVisibleTypeAnnotations
attribute.Returns Attribute mapper for theSignature
attribute.Returns Attribute mapper for theSourceDebugExtension
attribute.Returns Attribute mapper for theSourceFile
attribute.sourceId()
Returns Attribute mapper for theSourceID
attribute.Returns Attribute mapper for theStackMapTable
attribute.Returns Attribute mapper for theSynthetic
attribute.
-
Field Details
-
NAME_ANNOTATION_DEFAULT
-
NAME_BOOTSTRAP_METHODS
-
NAME_CHARACTER_RANGE_TABLE
-
NAME_CODE
-
NAME_COMPILATION_ID
-
NAME_CONSTANT_VALUE
-
NAME_DEPRECATED
-
NAME_ENCLOSING_METHOD
-
NAME_EXCEPTIONS
-
NAME_INNER_CLASSES
-
NAME_LINE_NUMBER_TABLE
-
NAME_LOCAL_VARIABLE_TABLE
-
NAME_LOCAL_VARIABLE_TYPE_TABLE
-
NAME_METHOD_PARAMETERS
-
NAME_MODULE
-
NAME_MODULE_HASHES
-
NAME_MODULE_MAIN_CLASS
-
NAME_MODULE_PACKAGES
-
NAME_MODULE_RESOLUTION
-
NAME_MODULE_TARGET
-
NAME_NEST_HOST
-
NAME_NEST_MEMBERS
-
NAME_PERMITTED_SUBCLASSES
-
NAME_RECORD
-
NAME_RUNTIME_INVISIBLE_ANNOTATIONS
-
NAME_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS
RuntimeInvisibleParameterAnnotations- See Also:
-
NAME_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS
RuntimeInvisibleTypeAnnotations- See Also:
-
NAME_RUNTIME_VISIBLE_ANNOTATIONS
-
NAME_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS
RuntimeVisibleParameterAnnotations- See Also:
-
NAME_RUNTIME_VISIBLE_TYPE_ANNOTATIONS
RuntimeVisibleTypeAnnotations- See Also:
-
NAME_SIGNATURE
-
NAME_SOURCE_DEBUG_EXTENSION
-
NAME_SOURCE_FILE
-
NAME_SOURCE_ID
-
NAME_STACK_MAP_TABLE
-
NAME_SYNTHETIC
-
-
Method Details
-
annotationDefault
Returns Attribute mapper for theAnnotationDefault
attribute.- Returns:
- Attribute mapper for the
AnnotationDefault
attribute - Since:
- 23
-
bootstrapMethods
Returns Attribute mapper for theBootstrapMethods
attribute.- Returns:
- Attribute mapper for the
BootstrapMethods
attribute - Since:
- 23
-
characterRangeTable
Returns Attribute mapper for theCharacterRangeTable
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
CharacterRangeTable
attribute - Since:
- 23
-
code
Returns Attribute mapper for theCode
attribute.- Returns:
- Attribute mapper for the
Code
attribute - Since:
- 23
-
compilationId
Returns Attribute mapper for theCompilationID
attribute.- Returns:
- Attribute mapper for the
CompilationID
attribute - Since:
- 23
-
constantValue
Returns Attribute mapper for theConstantValue
attribute.- Returns:
- Attribute mapper for the
ConstantValue
attribute - Since:
- 23
-
deprecated
Returns Attribute mapper for theDeprecated
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
Deprecated
attribute - Since:
- 23
-
enclosingMethod
Returns Attribute mapper for theEnclosingMethod
attribute.- Returns:
- Attribute mapper for the
EnclosingMethod
attribute - Since:
- 23
-
exceptions
Returns Attribute mapper for theExceptions
attribute.- Returns:
- Attribute mapper for the
Exceptions
attribute - Since:
- 23
-
innerClasses
Returns Attribute mapper for theInnerClasses
attribute.- Returns:
- Attribute mapper for the
InnerClasses
attribute - Since:
- 23
-
lineNumberTable
Returns Attribute mapper for theLineNumberTable
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LineNumberTable
attribute - Since:
- 23
-
localVariableTable
Returns Attribute mapper for theLocalVariableTable
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LocalVariableTable
attribute - Since:
- 23
-
localVariableTypeTable
public static AttributeMapperPREVIEW<LocalVariableTypeTableAttributePREVIEW> localVariableTypeTable()Returns Attribute mapper for theLocalVariableTypeTable
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LocalVariableTypeTable
attribute - Since:
- 23
-
methodParameters
Returns Attribute mapper for theMethodParameters
attribute.- Returns:
- Attribute mapper for the
MethodParameters
attribute - Since:
- 23
-
module
Returns Attribute mapper for theModule
attribute.- Returns:
- Attribute mapper for the
Module
attribute - Since:
- 23
-
moduleHashes
Returns Attribute mapper for theModuleHashes
attribute.- Returns:
- Attribute mapper for the
ModuleHashes
attribute - Since:
- 23
-
moduleMainClass
Returns Attribute mapper for theModuleMainClass
attribute.- Returns:
- Attribute mapper for the
ModuleMainClass
attribute - Since:
- 23
-
modulePackages
Returns Attribute mapper for theModulePackages
attribute.- Returns:
- Attribute mapper for the
ModulePackages
attribute - Since:
- 23
-
moduleResolution
Returns Attribute mapper for theModuleResolution
attribute.- Returns:
- Attribute mapper for the
ModuleResolution
attribute - Since:
- 23
-
moduleTarget
Returns Attribute mapper for theModuleTarget
attribute.- Returns:
- Attribute mapper for the
ModuleTarget
attribute - Since:
- 23
-
nestHost
Returns Attribute mapper for theNestHost
attribute.- Returns:
- Attribute mapper for the
NestHost
attribute - Since:
- 23
-
nestMembers
Returns Attribute mapper for theNestMembers
attribute.- Returns:
- Attribute mapper for the
NestMembers
attribute - Since:
- 23
-
permittedSubclasses
Returns Attribute mapper for thePermittedSubclasses
attribute.- Returns:
- Attribute mapper for the
PermittedSubclasses
attribute - Since:
- 23
-
record
Returns Attribute mapper for theRecord
attribute.- Returns:
- Attribute mapper for the
Record
attribute - Since:
- 23
-
runtimeInvisibleAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleAnnotationsAttributePREVIEW> runtimeInvisibleAnnotations()Returns Attribute mapper for theRuntimeInvisibleAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleAnnotations
attribute - Since:
- 23
-
runtimeInvisibleParameterAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleParameterAnnotationsAttributePREVIEW> runtimeInvisibleParameterAnnotations()Returns Attribute mapper for theRuntimeInvisibleParameterAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleParameterAnnotations
attribute - Since:
- 23
-
runtimeInvisibleTypeAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleTypeAnnotationsAttributePREVIEW> runtimeInvisibleTypeAnnotations()Returns Attribute mapper for theRuntimeInvisibleTypeAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleTypeAnnotations
attribute - Since:
- 23
-
runtimeVisibleAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleAnnotationsAttributePREVIEW> runtimeVisibleAnnotations()Returns Attribute mapper for theRuntimeVisibleAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeVisibleAnnotations
attribute - Since:
- 23
-
runtimeVisibleParameterAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleParameterAnnotationsAttributePREVIEW> runtimeVisibleParameterAnnotations()Returns Attribute mapper for theRuntimeVisibleParameterAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeVisibleParameterAnnotations
attribute - Since:
- 23
-
runtimeVisibleTypeAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleTypeAnnotationsAttributePREVIEW> runtimeVisibleTypeAnnotations()Returns Attribute mapper for theRuntimeVisibleTypeAnnotations
attribute.- Returns:
- Attribute mapper for the
RuntimeVisibleTypeAnnotations
attribute - Since:
- 23
-
signature
Returns Attribute mapper for theSignature
attribute.- Returns:
- Attribute mapper for the
Signature
attribute - Since:
- 23
-
sourceDebugExtension
Returns Attribute mapper for theSourceDebugExtension
attribute.- Returns:
- Attribute mapper for the
SourceDebugExtension
attribute - Since:
- 23
-
sourceFile
Returns Attribute mapper for theSourceFile
attribute.- Returns:
- Attribute mapper for the
SourceFile
attribute - Since:
- 23
-
sourceId
Returns Attribute mapper for theSourceID
attribute.- Returns:
- Attribute mapper for the
SourceID
attribute - Since:
- 23
-
stackMapTable
Returns Attribute mapper for theStackMapTable
attribute.- Returns:
- Attribute mapper for the
StackMapTable
attribute - Since:
- 23
-
synthetic
Returns Attribute mapper for theSynthetic
attribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
Synthetic
attribute - Since:
- 23
-
Attributes
when preview features are enabled.