Class CodeAttribute

    • Field Detail

      • attributeName

        private static CPUTF8 attributeName
      • attributes

        public java.util.List<Attribute> attributes
      • byteCodeOffsets

        public java.util.List<java.lang.Integer> byteCodeOffsets
      • byteCodes

        public java.util.List<ByteCode> byteCodes
      • codeLength

        public int codeLength
      • maxLocals

        public int maxLocals
      • maxStack

        public int maxStack
    • Constructor Detail

    • Method Detail

      • setAttributeName

        public static void setAttributeName​(CPUTF8 attributeName)
      • addAttribute

        public void addAttribute​(Attribute attribute)
      • 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