Top Fields Constructors Methods
org.apache.commons.compress.harmony.unpack200.bytecode

public Class CodeAttribute

extends BCIRenumberedAttribute
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, java.util.ArrayList, .List, org.apache.commons.compress.harmony.unpack200.Segment

Field Summary

Modifier and TypeField and Description
private static CPUTF8
public List<Attribute>
public List<Integer>
public List<ByteCode>
public int
public List<ExceptionTableEntry>
public int
public int
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute:
renumbered

Constructor Summary

AccessConstructor and Description
public
CodeAttribute(final int maxStack, final int maxLocals, final byte[] codePacked, final Segment segment, final OperandManager operandManager, final List<ExceptionTableEntry> exceptionTable)

Method Summary

Modifier and TypeMethod and Description
public void
addAttribute(final Attribute attribute)

protected int
protected ClassFileEntry[]
protected int[]
public void
renumber(final List<Integer>
List of Integer offsets of the byte code array
byteCodeOffsets
)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

In Pack200, line number tables are BCI renumbered.
protected void
resolve(final ClassConstantPool
TODO
pool
)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.resolve.

Allows the constant pool entries to resolve their nested entries.
public static void
setAttributeName(final CPUTF8 attributeName)

public String
toString()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.toString.

Returns a string representation of the object.
protected void
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute:
hasBCIRenumbering

Field Detail

attributeNameback to summary
private static CPUTF8 attributeName

Hides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.attributeName.

attributesback to summary
public List<Attribute> attributes
byteCodeOffsetsback to summary
public List<Integer> byteCodeOffsets
byteCodesback to summary
public List<ByteCode> byteCodes
codeLengthback to summary
public int codeLength
exceptionTableback to summary
public List<ExceptionTableEntry> exceptionTable
maxLocalsback to summary
public int maxLocals
maxStackback to summary
public int maxStack

Constructor Detail

CodeAttributeback to summary
public CodeAttribute(final int maxStack, final int maxLocals, final byte[] codePacked, final Segment segment, final OperandManager operandManager, final List<ExceptionTableEntry> exceptionTable)

Method Detail

addAttributeback to summary
public void addAttribute(final Attribute attribute)
getLengthback to summary
protected int getLength()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.getLength.

Annotations
@Override
getNestedClassFileEntriesback to summary
protected ClassFileEntry[] getNestedClassFileEntries()

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.getNestedClassFileEntries.

Annotations
@Override
getStartPCsback to summary
protected int[] getStartPCs()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.getStartPCs.

Annotations
@Override
renumberback to summary
public void renumber(final List<Integer> byteCodeOffsets)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.renumber.

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.

Parameters
byteCodeOffsets:List<Integer>

List of Integer offsets of the byte code array

Annotations
@Override
resolveback to summary
protected void resolve(final ClassConstantPool pool)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.resolve.

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry.resolve.

Allows the constant pool entries to resolve their nested entries.

Parameters
pool:ClassConstantPool

TODO

Annotations
@Override
setAttributeNameback to summary
public static void setAttributeName(final CPUTF8 attributeName)
toStringback to summary
public String toString()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
writeBodyback to summary
protected void writeBody(final DataOutputStream dos) throws IOException

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute.writeBody.

Annotations
@Override