Class BCIRenumberedAttribute
- java.lang.Object
-
- kala.compress.harmony.unpack200.bytecode.ClassFileEntry
-
- kala.compress.harmony.unpack200.bytecode.Attribute
-
- kala.compress.harmony.unpack200.bytecode.BCIRenumberedAttribute
-
- Direct Known Subclasses:
CodeAttribute,LineNumberTableAttribute,LocalVariableTableAttribute,LocalVariableTypeTableAttribute,NewAttribute
public abstract class BCIRenumberedAttribute extends Attribute
Abstract superclass for attributes that have some part encoded with a BCI renumbering
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanrenumbered-
Fields inherited from class kala.compress.harmony.unpack200.bytecode.Attribute
attributeName
-
Fields inherited from class kala.compress.harmony.unpack200.bytecode.ClassFileEntry
NONE
-
-
Constructor Summary
Constructors Constructor Description BCIRenumberedAttribute(CPUTF8 attributeName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intgetLength()protected abstract int[]getStartPCs()booleanhasBCIRenumbering()Answer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.voidrenumber(java.util.List<java.lang.Integer> byteCodeOffsets)In Pack200, line number tables are BCI renumbered.abstract java.lang.StringtoString()protected abstract voidwriteBody(java.io.DataOutputStream dos)-
Methods inherited from class kala.compress.harmony.unpack200.bytecode.Attribute
doWrite, equals, getAttributeName, getLengthIncludingHeader, getNestedClassFileEntries, hashCode, isSourceFileAttribute, resolve
-
Methods inherited from class kala.compress.harmony.unpack200.bytecode.ClassFileEntry
objectHashCode, write
-
-
-
-
Constructor Detail
-
BCIRenumberedAttribute
public BCIRenumberedAttribute(CPUTF8 attributeName)
-
-
Method Detail
-
getStartPCs
protected abstract int[] getStartPCs()
-
hasBCIRenumbering
public boolean hasBCIRenumbering()
Description copied from class:AttributeAnswer true if the receiver needs to have BCI renumbering applied to it; otherwise answer false.- Overrides:
hasBCIRenumberingin classAttribute- Returns:
- boolean BCI renumbering required
-
renumber
public void renumber(java.util.List<java.lang.Integer> byteCodeOffsets) throws Pack200ExceptionIn 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 of Integer offsets of the byte code array- Throws:
Pack200Exception- Thrown from a subclass.
-
toString
public abstract java.lang.String toString()
- Specified by:
toStringin classClassFileEntry
-
-