Interface Attribute

All Known Implementing Classes:
AttAnnotationDefault, AttBootstrapMethods, AttCode, AttConstantValue, AttDeprecated, AttEnclosingMethod, AttExceptions, AttInnerClasses, AttLineNumberTable, AttLocalVariableTable, AttLocalVariableTypeTable, AttRuntimeInvisibleAnnotations, AttRuntimeInvisibleParameterAnnotations, AttRuntimeVisibleAnnotations, AttRuntimeVisibleParameterAnnotations, AttSignature, AttSourceDebugExtension, AttSourceFile, AttSynthetic, BaseAnnotations, BaseAttribute, BaseLocalVariables, BaseParameterAnnotations, RawAttribute

public interface Attribute
Interface representing attributes of class files (directly or indirectly).
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the total length of the attribute in bytes, including the header.
    Get the name of the attribute.
  • Method Details

    • getName

      String getName()
      Get the name of the attribute.
      Returns:
      non-null; the name
    • byteLength

      int byteLength()
      Get the total length of the attribute in bytes, including the header. Since the header is always six bytes, the result of this method is always at least 6.
      Returns:
      >= 6; the total length, in bytes