Class SingleByteReferenceForm
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.ReferenceForm
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.SingleByteReferenceForm
-
- Direct Known Subclasses:
FloatRefForm,IntRefForm,StringRefForm
public abstract class SingleByteReferenceForm extends ReferenceForm
Some bytecodes (such as (a)ldc, fldc and ildc) have single-byte references to the class pool. This class is the abstract superclass of those classes.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanwidened-
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
byteCodeArray, byteCodesByName, WIDENED
-
-
Constructor Summary
Constructors Constructor Description SingleByteReferenceForm(int opcode, java.lang.String name, int[] rewrite)Constructs a new instance with the specified opcode, name, operandType and rewrite.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intgetOffset(OperandManager operandManager)protected abstract intgetPoolID()booleannestedMustStartClassPool()protected voidsetNestedEntries(ByteCode byteCode, OperandManager operandManager, int offset)Sets the nested entries.-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ReferenceForm
setByteCodeOperands
-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
calculateOperandPosition, firstOperandIndex, fixUpByteCodeTargets, get, getName, getOpcode, getRewrite, getRewriteCopy, hasMultipleByteCodes, hasNoOperand, operandLength, toString
-
-
-
-
Field Detail
-
widened
protected boolean widened
-
-
Constructor Detail
-
SingleByteReferenceForm
public SingleByteReferenceForm(int opcode, java.lang.String name, int[] rewrite)
Constructs a new instance with the specified opcode, name, operandType and rewrite.- Parameters:
opcode- index corresponding to the opcode's value.name- String printable name of the opcode.rewrite- Operand positions (which will later be rewritten in ByteCodes) are indicated by -1.
-
-
Method Detail
-
getOffset
protected abstract int getOffset(OperandManager operandManager)
- Specified by:
getOffsetin classReferenceForm
-
getPoolID
protected abstract int getPoolID()
- Specified by:
getPoolIDin classReferenceForm
-
nestedMustStartClassPool
public boolean nestedMustStartClassPool()
- Overrides:
nestedMustStartClassPoolin classByteCodeForm
-
setNestedEntries
protected void setNestedEntries(ByteCode byteCode, OperandManager operandManager, int offset) throws Pack200Exception
Description copied from class:ReferenceFormSets the nested entries.- Overrides:
setNestedEntriesin classReferenceForm- Parameters:
byteCode- byte codes.operandManager- Operand manager.offset- offset.- Throws:
Pack200Exception- if support for a type is not supported or the offset not in the range [0,Integer.MAX_VALUE].
-
-