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 STATELESSPREVIEW mappers are:
CP_REFSPREVIEW 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()
LABELSPREVIEW stability are:
The UNSTABLEPREVIEW mappers are:
- Since:
- 22
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAnnotationDefaultstatic final StringBootstrapMethodsstatic final StringCharacterRangeTablestatic final StringCodestatic final StringCompilationIDstatic final StringConstantValuestatic final StringDeprecatedstatic final StringEnclosingMethodstatic final StringExceptionsstatic final StringInnerClassesstatic final StringLineNumberTablestatic final StringLocalVariableTablestatic final StringLocalVariableTypeTablestatic final StringMethodParametersstatic final StringModulestatic final StringModuleHashesstatic final StringModuleMainClassstatic final StringModulePackagesstatic final StringModuleResolutionstatic final StringModuleTargetstatic final StringNestHoststatic final StringNestMembersstatic final StringPermittedSubclassesstatic final StringRecordstatic final StringRuntimeInvisibleAnnotationsstatic final StringRuntimeInvisibleParameterAnnotationsstatic final StringRuntimeInvisibleTypeAnnotationsstatic final StringRuntimeVisibleAnnotationsstatic final StringRuntimeVisibleParameterAnnotationsstatic final StringRuntimeVisibleTypeAnnotationsstatic final StringSignaturestatic final StringSourceDebugExtensionstatic final StringSourceFilestatic final StringSourceIDstatic final StringStackMapTablestatic final StringSynthetic -
Method Summary
Modifier and TypeMethodDescriptionReturns Attribute mapper for theAnnotationDefaultattribute.Returns Attribute mapper for theBootstrapMethodsattribute.Returns Attribute mapper for theCharacterRangeTableattribute.code()Returns Attribute mapper for theCodeattribute.Returns Attribute mapper for theCompilationIDattribute.Returns Attribute mapper for theConstantValueattribute.Returns Attribute mapper for theDeprecatedattribute.Returns Attribute mapper for theEnclosingMethodattribute.Returns Attribute mapper for theExceptionsattribute.Returns Attribute mapper for theInnerClassesattribute.Returns Attribute mapper for theLineNumberTableattribute.Returns Attribute mapper for theLocalVariableTableattribute.Returns Attribute mapper for theLocalVariableTypeTableattribute.Returns Attribute mapper for theMethodParametersattribute.module()Returns Attribute mapper for theModuleattribute.Returns Attribute mapper for theModuleHashesattribute.Returns Attribute mapper for theModuleMainClassattribute.Returns Attribute mapper for theModulePackagesattribute.Returns Attribute mapper for theModuleResolutionattribute.Returns Attribute mapper for theModuleTargetattribute.nestHost()Returns Attribute mapper for theNestHostattribute.Returns Attribute mapper for theNestMembersattribute.Returns Attribute mapper for thePermittedSubclassesattribute.record()Returns Attribute mapper for theRecordattribute.Returns Attribute mapper for theRuntimeInvisibleAnnotationsattribute.Returns Attribute mapper for theRuntimeInvisibleParameterAnnotationsattribute.Returns Attribute mapper for theRuntimeInvisibleTypeAnnotationsattribute.Returns Attribute mapper for theRuntimeVisibleAnnotationsattribute.Returns Attribute mapper for theRuntimeVisibleParameterAnnotationsattribute.Returns Attribute mapper for theRuntimeVisibleTypeAnnotationsattribute.Returns Attribute mapper for theSignatureattribute.Returns Attribute mapper for theSourceDebugExtensionattribute.Returns Attribute mapper for theSourceFileattribute.sourceId()Returns Attribute mapper for theSourceIDattribute.Returns Attribute mapper for theStackMapTableattribute.Returns Attribute mapper for theSyntheticattribute.
-
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 theAnnotationDefaultattribute.- Returns:
- Attribute mapper for the
AnnotationDefaultattribute - Since:
- 23
-
bootstrapMethods
Returns Attribute mapper for theBootstrapMethodsattribute.- Returns:
- Attribute mapper for the
BootstrapMethodsattribute - Since:
- 23
-
characterRangeTable
Returns Attribute mapper for theCharacterRangeTableattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
CharacterRangeTableattribute - Since:
- 23
-
code
Returns Attribute mapper for theCodeattribute.- Returns:
- Attribute mapper for the
Codeattribute - Since:
- 23
-
compilationId
Returns Attribute mapper for theCompilationIDattribute.- Returns:
- Attribute mapper for the
CompilationIDattribute - Since:
- 23
-
constantValue
Returns Attribute mapper for theConstantValueattribute.- Returns:
- Attribute mapper for the
ConstantValueattribute - Since:
- 23
-
deprecated
Returns Attribute mapper for theDeprecatedattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
Deprecatedattribute - Since:
- 23
-
enclosingMethod
Returns Attribute mapper for theEnclosingMethodattribute.- Returns:
- Attribute mapper for the
EnclosingMethodattribute - Since:
- 23
-
exceptions
Returns Attribute mapper for theExceptionsattribute.- Returns:
- Attribute mapper for the
Exceptionsattribute - Since:
- 23
-
innerClasses
Returns Attribute mapper for theInnerClassesattribute.- Returns:
- Attribute mapper for the
InnerClassesattribute - Since:
- 23
-
lineNumberTable
Returns Attribute mapper for theLineNumberTableattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LineNumberTableattribute - Since:
- 23
-
localVariableTable
Returns Attribute mapper for theLocalVariableTableattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LocalVariableTableattribute - Since:
- 23
-
localVariableTypeTable
public static AttributeMapperPREVIEW<LocalVariableTypeTableAttributePREVIEW> localVariableTypeTable()Returns Attribute mapper for theLocalVariableTypeTableattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
LocalVariableTypeTableattribute - Since:
- 23
-
methodParameters
Returns Attribute mapper for theMethodParametersattribute.- Returns:
- Attribute mapper for the
MethodParametersattribute - Since:
- 23
-
module
Returns Attribute mapper for theModuleattribute.- Returns:
- Attribute mapper for the
Moduleattribute - Since:
- 23
-
moduleHashes
Returns Attribute mapper for theModuleHashesattribute.- Returns:
- Attribute mapper for the
ModuleHashesattribute - Since:
- 23
-
moduleMainClass
Returns Attribute mapper for theModuleMainClassattribute.- Returns:
- Attribute mapper for the
ModuleMainClassattribute - Since:
- 23
-
modulePackages
Returns Attribute mapper for theModulePackagesattribute.- Returns:
- Attribute mapper for the
ModulePackagesattribute - Since:
- 23
-
moduleResolution
Returns Attribute mapper for theModuleResolutionattribute.- Returns:
- Attribute mapper for the
ModuleResolutionattribute - Since:
- 23
-
moduleTarget
Returns Attribute mapper for theModuleTargetattribute.- Returns:
- Attribute mapper for the
ModuleTargetattribute - Since:
- 23
-
nestHost
Returns Attribute mapper for theNestHostattribute.- Returns:
- Attribute mapper for the
NestHostattribute - Since:
- 23
-
nestMembers
Returns Attribute mapper for theNestMembersattribute.- Returns:
- Attribute mapper for the
NestMembersattribute - Since:
- 23
-
permittedSubclasses
Returns Attribute mapper for thePermittedSubclassesattribute.- Returns:
- Attribute mapper for the
PermittedSubclassesattribute - Since:
- 23
-
record
Returns Attribute mapper for theRecordattribute.- Returns:
- Attribute mapper for the
Recordattribute - Since:
- 23
-
runtimeInvisibleAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleAnnotationsAttributePREVIEW> runtimeInvisibleAnnotations()Returns Attribute mapper for theRuntimeInvisibleAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleAnnotationsattribute - Since:
- 23
-
runtimeInvisibleParameterAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleParameterAnnotationsAttributePREVIEW> runtimeInvisibleParameterAnnotations()Returns Attribute mapper for theRuntimeInvisibleParameterAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleParameterAnnotationsattribute - Since:
- 23
-
runtimeInvisibleTypeAnnotations
public static AttributeMapperPREVIEW<RuntimeInvisibleTypeAnnotationsAttributePREVIEW> runtimeInvisibleTypeAnnotations()Returns Attribute mapper for theRuntimeInvisibleTypeAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeInvisibleTypeAnnotationsattribute - Since:
- 23
-
runtimeVisibleAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleAnnotationsAttributePREVIEW> runtimeVisibleAnnotations()Returns Attribute mapper for theRuntimeVisibleAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeVisibleAnnotationsattribute - Since:
- 23
-
runtimeVisibleParameterAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleParameterAnnotationsAttributePREVIEW> runtimeVisibleParameterAnnotations()Returns Attribute mapper for theRuntimeVisibleParameterAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeVisibleParameterAnnotationsattribute - Since:
- 23
-
runtimeVisibleTypeAnnotations
public static AttributeMapperPREVIEW<RuntimeVisibleTypeAnnotationsAttributePREVIEW> runtimeVisibleTypeAnnotations()Returns Attribute mapper for theRuntimeVisibleTypeAnnotationsattribute.- Returns:
- Attribute mapper for the
RuntimeVisibleTypeAnnotationsattribute - Since:
- 23
-
signature
Returns Attribute mapper for theSignatureattribute.- Returns:
- Attribute mapper for the
Signatureattribute - Since:
- 23
-
sourceDebugExtension
Returns Attribute mapper for theSourceDebugExtensionattribute.- Returns:
- Attribute mapper for the
SourceDebugExtensionattribute - Since:
- 23
-
sourceFile
Returns Attribute mapper for theSourceFileattribute.- Returns:
- Attribute mapper for the
SourceFileattribute - Since:
- 23
-
sourceId
Returns Attribute mapper for theSourceIDattribute.- Returns:
- Attribute mapper for the
SourceIDattribute - Since:
- 23
-
stackMapTable
Returns Attribute mapper for theStackMapTableattribute.- Returns:
- Attribute mapper for the
StackMapTableattribute - Since:
- 23
-
synthetic
Returns Attribute mapper for theSyntheticattribute. The mapper permits multiple instances in a given location.- Returns:
- Attribute mapper for the
Syntheticattribute - Since:
- 23
-
Attributeswhen preview features are enabled.