Class Attributes

java.lang.Object
java.lang.classfile.Attributes

public final class Attributes extends Object
Attribute mappers for predefined (JVMS 4.7) and JDK-specific nonstandard attributes.

Unless otherwise specified, each mapper returned by methods in this class:

Since:
24
See Also:
  • Field Details

  • Method Details

    • annotationDefault

      public static AttributeMapper<AnnotationDefaultAttribute> annotationDefault()
      Returns the mapper for the AnnotationDefault attribute.
      Returns:
      the mapper for the AnnotationDefault attribute
    • bootstrapMethods

      public static AttributeMapper<BootstrapMethodsAttribute> bootstrapMethods()
      Returns the mapper for the BootstrapMethods attribute.
      Returns:
      the mapper for the BootstrapMethods attribute
    • characterRangeTable

      public static AttributeMapper<CharacterRangeTableAttribute> characterRangeTable()
      Returns the mapper for the CharacterRangeTable attribute. This is a JDK-specific attribute. The mapper permits multiple instances in a Code attribute, but this attribute should be only emitted once. This has a data dependency on labels.
      Returns:
      the mapper for the CharacterRangeTable attribute
    • code

      public static AttributeMapper<CodeAttribute> code()
      Returns the mapper for the Code attribute.
      Returns:
      the mapper for the Code attribute
    • compilationId

      public static AttributeMapper<CompilationIDAttribute> compilationId()
      Returns the mapper for the CompilationID attribute. This is a JDK-specific attribute.
      Returns:
      the mapper for the CompilationID attribute
    • constantValue

      public static AttributeMapper<ConstantValueAttribute> constantValue()
      Returns the mapper for the ConstantValue attribute.
      Returns:
      the mapper for the ConstantValue attribute
    • deprecated

      public static AttributeMapper<DeprecatedAttribute> deprecated()
      Returns the mapper for the Deprecated attribute. The mapper permits multiple instances in a given location. This has no data dependency.
      Returns:
      the mapper for the Deprecated attribute
    • enclosingMethod

      public static AttributeMapper<EnclosingMethodAttribute> enclosingMethod()
      Returns the mapper for the EnclosingMethod attribute.
      Returns:
      the mapper for the EnclosingMethod attribute
    • exceptions

      public static AttributeMapper<ExceptionsAttribute> exceptions()
      Returns the mapper for the Exceptions attribute.
      Returns:
      the mapper for the Exceptions attribute
    • innerClasses

      public static AttributeMapper<InnerClassesAttribute> innerClasses()
      Returns the mapper for the InnerClasses attribute.
      Returns:
      the mapper for the InnerClasses attribute
    • lineNumberTable

      public static AttributeMapper<LineNumberTableAttribute> lineNumberTable()
      Returns the mapper for the LineNumberTable attribute. The mapper permits multiple instances in a Code attribute. This has a data dependency on labels.
      Returns:
      the mapper for the LineNumberTable attribute
    • localVariableTable

      public static AttributeMapper<LocalVariableTableAttribute> localVariableTable()
      Returns the mapper for the LocalVariableTable attribute. The mapper permits multiple instances in a Code attribute. This has a data dependency on labels.
      Returns:
      the mapper for the LocalVariableTable attribute
    • localVariableTypeTable

      public static AttributeMapper<LocalVariableTypeTableAttribute> localVariableTypeTable()
      Returns the mapper for the LocalVariableTypeTable attribute. The mapper permits multiple instances in a given location. This has a data dependency on labels.
      Returns:
      the mapper for the LocalVariableTypeTable attribute
    • methodParameters

      public static AttributeMapper<MethodParametersAttribute> methodParameters()
      Returns the mapper for the MethodParameters attribute.
      Returns:
      the mapper for the MethodParameters attribute
    • module

      public static AttributeMapper<ModuleAttribute> module()
      Returns the mapper for the Module attribute.
      Returns:
      the mapper for the Module attribute
    • moduleHashes

      public static AttributeMapper<ModuleHashesAttribute> moduleHashes()
      Returns the mapper for the ModuleHashes attribute. This is a JDK-specific attribute.
      Returns:
      the mapper for the ModuleHashes attribute
    • moduleMainClass

      public static AttributeMapper<ModuleMainClassAttribute> moduleMainClass()
      Returns the mapper for the ModuleMainClass attribute.
      Returns:
      the mapper for the ModuleMainClass attribute
    • modulePackages

      public static AttributeMapper<ModulePackagesAttribute> modulePackages()
      Returns the mapper for the ModulePackages attribute.
      Returns:
      the mapper for the ModulePackages attribute
    • moduleResolution

      public static AttributeMapper<ModuleResolutionAttribute> moduleResolution()
      Returns the mapper for the ModuleResolution attribute. This is a JDK-specific attribute. This has no data dependency.
      Returns:
      the mapper for the ModuleResolution attribute
    • moduleTarget

      public static AttributeMapper<ModuleTargetAttribute> moduleTarget()
      Returns the mapper for the ModuleTarget attribute. This is a JDK-specific attribute.
      Returns:
      the mapper for the ModuleTarget attribute
    • nestHost

      public static AttributeMapper<NestHostAttribute> nestHost()
      Returns the mapper for the NestHost attribute.
      Returns:
      the mapper for the NestHost attribute
    • nestMembers

      public static AttributeMapper<NestMembersAttribute> nestMembers()
      Returns the mapper for the NestMembers attribute.
      Returns:
      the mapper for the NestMembers attribute
    • permittedSubclasses

      public static AttributeMapper<PermittedSubclassesAttribute> permittedSubclasses()
      Returns the mapper for the PermittedSubclasses attribute.
      Returns:
      the mapper for the PermittedSubclasses attribute
    • record

      public static AttributeMapper<RecordAttribute> record()
      Returns the mapper for the Record attribute.
      Returns:
      the mapper for the Record attribute
    • runtimeInvisibleAnnotations

      public static AttributeMapper<RuntimeInvisibleAnnotationsAttribute> runtimeInvisibleAnnotations()
      Returns the mapper for the RuntimeInvisibleAnnotations attribute.
      Returns:
      the mapper for the RuntimeInvisibleAnnotations attribute
    • runtimeInvisibleParameterAnnotations

      public static AttributeMapper<RuntimeInvisibleParameterAnnotationsAttribute> runtimeInvisibleParameterAnnotations()
      Returns the mapper for the RuntimeInvisibleParameterAnnotations attribute.
      Returns:
      the mapper for the RuntimeInvisibleParameterAnnotations attribute
    • runtimeInvisibleTypeAnnotations

      public static AttributeMapper<RuntimeInvisibleTypeAnnotationsAttribute> runtimeInvisibleTypeAnnotations()
      Returns the mapper for the RuntimeInvisibleTypeAnnotations attribute. This has a data dependency on arbitrary indices in the class file format.
      Returns:
      the mapper for the RuntimeInvisibleTypeAnnotations attribute
    • runtimeVisibleAnnotations

      public static AttributeMapper<RuntimeVisibleAnnotationsAttribute> runtimeVisibleAnnotations()
      Returns the mapper for the RuntimeVisibleAnnotations attribute.
      Returns:
      the mapper for the RuntimeVisibleAnnotations attribute
    • runtimeVisibleParameterAnnotations

      public static AttributeMapper<RuntimeVisibleParameterAnnotationsAttribute> runtimeVisibleParameterAnnotations()
      Returns the mapper for the RuntimeVisibleParameterAnnotations attribute.
      Returns:
      the mapper for the RuntimeVisibleParameterAnnotations attribute
    • runtimeVisibleTypeAnnotations

      public static AttributeMapper<RuntimeVisibleTypeAnnotationsAttribute> runtimeVisibleTypeAnnotations()
      Returns the mapper for the RuntimeVisibleTypeAnnotations attribute. This has a data dependency on arbitrary indices in the class file format.
      Returns:
      the mapper for the RuntimeVisibleTypeAnnotations attribute
    • signature

      public static AttributeMapper<SignatureAttribute> signature()
      Returns the mapper for the Signature attribute.
      Returns:
      the mapper for the Signature attribute
    • sourceDebugExtension

      public static AttributeMapper<SourceDebugExtensionAttribute> sourceDebugExtension()
      Returns the mapper for the SourceDebugExtension attribute. This has no data dependency.
      Returns:
      the mapper for the SourceDebugExtension attribute
    • sourceFile

      public static AttributeMapper<SourceFileAttribute> sourceFile()
      Returns the mapper for the SourceFile attribute.
      Returns:
      the mapper for the SourceFile attribute
    • sourceId

      public static AttributeMapper<SourceIDAttribute> sourceId()
      Returns the mapper for the SourceID attribute. This is a JDK-specific attribute.
      Returns:
      the mapper for the SourceID attribute
    • stackMapTable

      public static AttributeMapper<StackMapTableAttribute> stackMapTable()
      Returns the mapper for the StackMapTable attribute. This has a data dependency on labels.
      Returns:
      the mapper for the StackMapTable attribute
    • synthetic

      public static AttributeMapper<SyntheticAttribute> synthetic()
      Returns the mapper for the Synthetic attribute. The mapper permits multiple instances in a given location. This has no data dependency.
      Returns:
      the mapper for the Synthetic attribute