Package org.apache.commons.compress.harmony.unpack200.bytecode

# Class LocalVariableTableAttribute

java.lang.Object
org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
org.apache.commons.compress.harmony.unpack200.bytecode.Attribute
org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute
org.apache.commons.compress.harmony.unpack200.bytecode.LocalVariableTableAttribute

public class LocalVariableTableAttribute extends BCIRenumberedAttribute
Local variable table

- ## Field Summary

  ### Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute

  `renumbered`

  ### Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry

  `NONE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LocalVariableTableAttribute(int localVariableTableLength, int[] startPcs, int[] lengths, CPUTF8[] names, CPUTF8[] descriptors, int[] indexes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `getLength()`
  `protected ClassFileEntry[]`
  `getNestedClassFileEntries()`
  `protected int[]`
  `getStartPCs()`
  `void`
  `renumber(List<Integer> byteCodeOffsets)`
  In Pack200, line number tables are BCI renumbered.
  `protected void`
  `resolve(ClassConstantPool pool)`
  Allows the constant pool entries to resolve their nested entries.
  `static void`
  `setAttributeName(CPUTF8 cpUTF8Value)`
  `void`
  `setCodeLength(int length)`
  `String`
  `toString()`
  `protected void`
  `writeBody(DataOutputStream dos)`

  ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute

  `hasBCIRenumbering`

  ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.Attribute

  `doWrite, equals, getAttributeName, getLengthIncludingHeader, hashCode, isSourceFileAttribute`

  ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry

  `objectHashCode, write`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### LocalVariableTableAttribute

    public LocalVariableTableAttribute(int localVariableTableLength, int[] startPcs, int[] lengths, CPUTF8[] names, CPUTF8[] descriptors, int[] indexes)

- ## Method Details

  - ### setAttributeName

    public static void setAttributeName(CPUTF8 cpUTF8Value)

  - ### getLength

    protected int getLength()
    Specified by:
      `getLength` in class `BCIRenumberedAttribute`

  - ### getNestedClassFileEntries

    protected ClassFileEntry[] getNestedClassFileEntries()
    Overrides:
      `getNestedClassFileEntries` in class `Attribute`

  - ### getStartPCs

    protected int[] getStartPCs()
    Specified by:
      `getStartPCs` in class `BCIRenumberedAttribute`

  - ### 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` - TODO

  - ### setCodeLength

    public void setCodeLength(int length)

  - ### toString

    public String toString()
    Specified by:
      `toString` in class `BCIRenumberedAttribute`

  - ### writeBody

    protected void writeBody(DataOutputStream dos) throws IOException
    Specified by:
      `writeBody` in class `BCIRenumberedAttribute`
    Throws:
      `IOException`