Class WideForm
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.VariableInstructionForm
-
- org.apache.commons.compress.harmony.unpack200.bytecode.forms.WideForm
-
public class WideForm extends VariableInstructionForm
This class implements the byte code form for the wide instruction. Unlike other instructions, it can take multiple forms, depending on what is being widened.
-
-
Field Summary
-
Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
byteCodeArray, byteCodesByName, WIDENED
-
-
Constructor Summary
Constructors Constructor Description WideForm(int opcode, java.lang.String name)Constructs a new instance with the specified opcode, name, operandType and rewrite.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetByteCodeOperands(ByteCode byteCode, OperandManager operandManager, int codeLength)Sets the rewrite of the byteCode.protected voidsetByteCodeOperandsFormat1(int instruction, ByteCode byteCode, OperandManager operandManager, int codeLength)This method sets the rewrite array for the bytecode using Format 1 of the JVM spec: an opcode and two index bytes.protected voidsetByteCodeOperandsFormat2(int instruction, ByteCode byteCode, OperandManager operandManager, int codeLength)This method sets the rewrite array for the bytecode using Format 2 of the JVM spec: an opcode, two index bytes, and two constant bytes.-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.VariableInstructionForm
setRewrite2Bytes, setRewrite4Bytes, setRewrite4Bytes
-
Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
calculateOperandPosition, firstOperandIndex, fixUpByteCodeTargets, get, getName, getOpcode, getRewrite, getRewriteCopy, hasMultipleByteCodes, hasNoOperand, nestedMustStartClassPool, operandLength, toString
-
-
-
-
Constructor Detail
-
WideForm
public WideForm(int opcode, java.lang.String name)
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.
-
-
Method Detail
-
setByteCodeOperands
public void setByteCodeOperands(ByteCode byteCode, OperandManager operandManager, int codeLength)
Description copied from class:ByteCodeFormSets the rewrite of the byteCode.- Specified by:
setByteCodeOperandsin classByteCodeForm- Parameters:
byteCode- ByteCode to be updated (!)operandManager- OperandTable from which to draw infocodeLength- Length of bytes (excluding this bytecode) from the beginning of the method. Used in calculating padding for some variable-length bytecodes (such as lookupswitch, tableswitch).
-
setByteCodeOperandsFormat1
protected void setByteCodeOperandsFormat1(int instruction, ByteCode byteCode, OperandManager operandManager, int codeLength)
This method sets the rewrite array for the bytecode using Format 1 of the JVM spec: an opcode and two index bytes. This is used for ?load/?store/ret- Parameters:
instruction- should be 132byteCode- the byte code whose rewrite array should be updatedoperandManager- the source of the operandscodeLength- ignored
-
setByteCodeOperandsFormat2
protected void setByteCodeOperandsFormat2(int instruction, ByteCode byteCode, OperandManager operandManager, int codeLength)
This method sets the rewrite array for the bytecode using Format 2 of the JVM spec: an opcode, two index bytes, and two constant bytes. This is used for iinc.- Parameters:
instruction- int should be 132byteCode- ByteCode whose rewrite array should be updatedoperandManager- OperandManager source of the operandscodeLength- ignored
-
-