Class NewAttribute

    • Field Detail

      • lengths

        private final java.util.List<java.lang.Integer> lengths
      • body

        private final java.util.List<java.lang.Object> body
      • layoutIndex

        private final int layoutIndex
    • Constructor Detail

      • NewAttribute

        public NewAttribute​(CPUTF8 attributeName,
                            int layoutIndex)
    • Method Detail

      • 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,
                              java.lang.Object value)
      • getLayoutIndex

        public int getLayoutIndex()
      • renumber

        public void renumber​(java.util.List<java.lang.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
      • writeBody

        protected void writeBody​(java.io.DataOutputStream dos)
                          throws java.io.IOException
        Specified by:
        writeBody in class BCIRenumberedAttribute
        Throws:
        java.io.IOException