Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help
  • Summary:

    • Nested
    • Field
    • Constr
    • Method
  • Detail:

    • Field
    • Constr
    • Method
  • Summary: 
  • Nested | 
  • Field | 
  • Constr | 
  • Method
  • Detail: 
  • Field | 
  • Constr | 
  • Method
SEARCH
Package org.apache.commons.compress.harmony.unpack200.bytecode

Class CodeAttribute

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.CodeAttribute

public class CodeAttribute extends BCIRenumberedAttribute
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    List<Attribute>
    attributes
     
    List<Integer>
    byteCodeOffsets
     
    List<ByteCode>
    byteCodes
     
    int
    codeLength
     
    List<ExceptionTableEntry>
    exceptionTable
     
    int
    maxLocals
     
    int
    maxStack
     

    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
    CodeAttribute(int maxStack, int maxLocals, byte[] codePacked, Segment segment, OperandManager operandManager, List<ExceptionTableEntry> exceptionTable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAttribute(Attribute attribute)
     
    protected int
    getLength()
    Gets the length.
    protected ClassFileEntry[]
    getNestedClassFileEntries()
    Returns an empty array.
    protected int[]
    getStartPCs()
    Gets the array of indices for the start of line numbers.
    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 attributeName)
     
    String
    toString()
     
    protected void
    writeBody(DataOutputStream dos)
    Writes this body to the given output stream.

    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
  • Field Details

    • attributes

      public List<Attribute> attributes
    • byteCodeOffsets

      public List<Integer> byteCodeOffsets
    • byteCodes

      public List<ByteCode> byteCodes
    • codeLength

      public int codeLength
    • exceptionTable

      public List<ExceptionTableEntry> exceptionTable
    • maxLocals

      public int maxLocals
    • maxStack

      public int maxStack
  • Constructor Details

    • CodeAttribute

      public CodeAttribute(int maxStack, int maxLocals, byte[] codePacked, Segment segment, OperandManager operandManager, List<ExceptionTableEntry> exceptionTable) throws Pack200Exception
      Throws:
      Pack200Exception
  • Method Details

    • setAttributeName

      public static void setAttributeName(CPUTF8 attributeName)
    • addAttribute

      public void addAttribute(Attribute attribute)
    • 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)
      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 - The class constant pool.
    • 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.

Copyright © 2002-2025 The Apache Software Foundation. All rights reserved.
Apache Commons Compress |Issue management |Source repository