public class NewAttribute extends BCIRenumberedAttribute
A compressor-defined class file attribute.
  • Field Details

  • Constructor Details

    • NewAttribute

      public NewAttribute(CPUTF8 attributeName, int layoutIndex)
  • Method Details

    • addBCIndex

      public void addBCIndex(int length, int value)
    • addBCLength

      public void addBCLength(int length, int value)
    • addBCOffset

      public void addBCOffset(int length, int value)
    • addInteger

      public void addInteger(int length, long value)
    • addToBody

      public void addToBody(int length, Object value)
    • getLayoutIndex

      public int getLayoutIndex()
    • 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)
      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
    • 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
    • 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