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

public abstract Class BCIRenumberedAttribute

extends Attribute
Class Inheritance
Known Direct Subclasses
org.apache.commons.compress.harmony.unpack200.bytecode.CodeAttribute, org.apache.commons.compress.harmony.unpack200.bytecode.LineNumberTableAttribute, org.apache.commons.compress.harmony.unpack200.bytecode.LocalVariableTableAttribute, org.apache.commons.compress.harmony.unpack200.bytecode.LocalVariableTypeTableAttribute, org.apache.commons.compress.harmony.unpack200.bytecode.NewAttribute
Imports
java.io.DataOutputStream, .IOException, java.util.Arrays, .List, org.apache.commons.compress.harmony.pack200.Pack200Exception

Abstract superclass for attributes that have some part encoded with a BCI renumbering

Field Summary

Modifier and TypeField and Description
protected boolean
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.Attribute:
attributeName

Constructor Summary

AccessConstructor and Description
public
BCIRenumberedAttribute(final CPUTF8 attributeName)

Method Summary

Modifier and TypeMethod and Description
protected abstract int
protected abstract int[]
public boolean
hasBCIRenumbering()

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

Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.
public void
renumber(final List<Integer>
List of Integer offsets of the byte code array
byteCodeOffsets
)

In Pack200, line number tables are BCI renumbered.

public abstract String
toString()

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

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

Field Detail

renumberedback to summary
protected boolean renumbered

Constructor Detail

BCIRenumberedAttributeback to summary
public BCIRenumberedAttribute(final CPUTF8 attributeName)

Method Detail

getLengthback to summary
protected abstract int getLength()

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

Annotations
@Override
getStartPCsback to summary
protected abstract int[] getStartPCs()
hasBCIRenumberingback to summary
public boolean hasBCIRenumbering()

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

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.Attribute.hasBCIRenumbering.

Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.

Returns:boolean

boolean BCI renumbering required

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

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

Exceptions
Pack200Exception:
Thrown from a subclass.
toStringback to summary
public abstract String toString()

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry.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 abstract void writeBody(DataOutputStream dos) throws IOException

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

Annotations
@Override