Class SignatureData

All Implemented Interfaces:
Printable

public class SignatureData extends MemberData<ClassData>
The Signature attribute data since class file 49.0

Signature_attribute { u2 attribute_name_index; u4 attribute_length; u2 signature_index; }

  • Field Details

    • cpIndex

      private int cpIndex
    • signatureType

      private Type signatureType
    • keywordPadding

      private int keywordPadding
    • eol

      private String eol
  • Constructor Details

    • SignatureData

      public SignatureData(ClassData classData)
  • Method Details

    • getCPIndex

      public int getCPIndex()
    • isPrintable

      public boolean isPrintable()
    • read

      public SignatureData read(DataInputStream in, int attribute_length) throws IOException, ClassFormatError
      Throws:
      IOException
      ClassFormatError
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getJavaSignature

      public String getJavaSignature()
    • getSignatureType

      public Type getSignatureType()
    • setKeywordPadding

      public SignatureData setKeywordPadding(int keywordPadding)
    • getPrintAttributeKeyPadding

      protected int getPrintAttributeKeyPadding()
      Description copied from class: Indenter
      Calculates offsets for Class's attributes:

      12AAAAAAAAAAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCC SourceFile #126; // TestMethods0.java 12 - Indent AAA.A - getPrintAttributeKeyPadding() CCC.C - getPrintAttributeCommentPadding()

      Overrides:
      getPrintAttributeKeyPadding in class Indenter
      Returns:
    • disableNewLine

      public SignatureData disableNewLine()
    • enableNewLine

      public SignatureData enableNewLine()
    • tablePrint

      protected void tablePrint()
      Overrides:
      tablePrint in class Indenter
    • jasmPrint

      protected void jasmPrint()
      Overrides:
      jasmPrint in class Indenter
    • getJasmPrintInfo

      public Pair<String,String> getJasmPrintInfo(Function<Integer,Boolean> checkRange)
      Parameters:
      checkRange - function to check that index belongs CP
      Returns:
      a string representation of the index and signature used to print the JASM-specific signature of ClassFile, field_info, method_info, or record_component_info. Alternatively, return an empty pair (new Pair("", "")) if extended (table-specific) printing is requested.