Class ClassRefForm
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.ClassRefForm
- Direct Known Subclasses:
MultiANewArrayForm, NarrowClassRefForm, NewClassRefForm
This class implements the byte code form for those bytecodes which have class references (and only class references).
-
Field Summary
FieldsFields inherited from class ByteCodeForm
byteCodeArray, byteCodesByName, WIDENED -
Constructor Summary
ConstructorsConstructorDescriptionClassRefForm(int opcode, String name, int[] rewrite) Constructs a new instance with the specified opcode, name, operandType and rewrite.ClassRefForm(int opcode, String name, int[] rewrite, boolean widened) Constructs a new instance with the specified opcode, name, operandType and rewrite. -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetOffset(OperandManager operandManager) protected intprotected voidsetNestedEntries(ByteCode byteCode, OperandManager operandManager, int offset) Sets the nested entries.Methods inherited from class ReferenceForm
setByteCodeOperandsMethods inherited from class ByteCodeForm
calculateOperandPosition, firstOperandIndex, fixUpByteCodeTargets, get, getName, getOpcode, getRewrite, getRewriteCopy, hasMultipleByteCodes, hasNoOperand, nestedMustStartClassPool, operandLength, toString
-
Field Details
-
widened
-
-
Constructor Details
-
ClassRefForm
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.
-
ClassRefForm
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.widened- TODO.
-
-
Method Details
-
getOffset
- Specified by:
getOffsetin classReferenceForm
-
getPoolID
- Specified by:
getPoolIDin classReferenceForm
-
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].
-