Class LocalVariableTypeTableAttribute


public class LocalVariableTypeTableAttribute extends BCIRenumberedAttribute
Local variable type table.
  • Field Details

    • attributeName

      private static CPUTF8 attributeName
    • localVariableTypeTableLength

      private final int localVariableTypeTableLength
    • startPcs

      private final int[] startPcs
    • lengths

      private final int[] lengths
    • nameIndexes

      private int[] nameIndexes
    • signatureIndexes

      private int[] signatureIndexes
    • indexes

      private final int[] indexes
    • names

      private final CPUTF8[] names
    • signatures

      private final CPUTF8[] signatures
    • codeLength

      private int codeLength
  • Constructor Details

    • LocalVariableTypeTableAttribute

      public LocalVariableTypeTableAttribute(int localVariableTypeTableLength, int[] startPcs, int[] lengths, CPUTF8[] names, CPUTF8[] signatures, int[] indexes)
  • Method Details

    • setAttributeName

      public static void setAttributeName(CPUTF8 cpUTF8Value)
    • getLength

      protected int getLength()
      Description copied from class: Attribute
      Gets the length.
      Specified by:
      getLength in class BCIRenumberedAttribute
      Returns:
      the length.
    • getNestedClassFileEntries

      protected ClassFileEntry[] getNestedClassFileEntries()
      Description copied from class: ClassFileEntry
      Returns an empty array.
      Overrides:
      getNestedClassFileEntries in class Attribute
      Returns:
      an empty array.
    • getStartPCs

      protected int[] getStartPCs()
      Description copied from class: BCIRenumberedAttribute
      Gets the array of indices for the start of line numbers.
      Specified by:
      getStartPCs in class BCIRenumberedAttribute
      Returns:
      the array of indices for the start of line numbers.
    • renumber

      public void renumber(List<Integer> byteCodeOffsets) throws Pack200Exception
      Description copied from class: BCIRenumberedAttribute
      In Pack200, line number tables are BCI renumbered. This method takes the byteCodeOffsets (which is a List of Integers specifying the offset in the byte code array of each instruction) and updates the start_pcs so that it points to the instruction index itself, not the BCI renumbering of the instruction.
      Overrides:
      renumber in class BCIRenumberedAttribute
      Parameters:
      byteCodeOffsets - List of Integer offsets of the byte code array.
      Throws:
      Pack200Exception - Thrown from a subclass.
    • resolve

      protected void resolve(ClassConstantPool pool)
      Description copied from class: ClassFileEntry
      Allows the constant pool entries to resolve their nested entries.
      Overrides:
      resolve in class Attribute
      Parameters:
      pool - The class constant pool.
    • setCodeLength

      public void setCodeLength(int length)
    • toString

      public String toString()
      Specified by:
      toString in class BCIRenumberedAttribute
    • writeBody

      protected void writeBody(DataOutputStream dos) throws IOException
      Description copied from class: Attribute
      Writes this body to the given output stream.
      Specified by:
      writeBody in class BCIRenumberedAttribute
      Parameters:
      dos - the output stream.
      Throws:
      IOException - if an I/O error occurs.