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

public Class WideForm

extends VariableInstructionForm
Class Inheritance
Imports
org.apache.commons.compress.harmony.unpack200.bytecode.ByteCode, .OperandManager

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.

Constructor Summary

AccessConstructor and Description
public
WideForm(final int opcode, final String name)

Method Summary

Modifier and TypeMethod and Description
public void
setByteCodeOperands(final ByteCode
ByteCode to be updated (!)
byteCode
,
final OperandManager
OperandTable from which to draw info
operandManager
,
final int
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).
codeLength
)

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm.setByteCodeOperands.

When passed a byteCode, an OperandTable and a SegmentConstantPool, this method will set the rewrite of the byteCode appropriately.
protected void
setByteCodeOperandsFormat1(final int
should be 132
instruction
,
final ByteCode
the byte code whose rewrite array should be updated
byteCode
,
final OperandManager
the source of the operands
operandManager
,
final int
ignored
codeLength
)

This method sets the rewrite array for the bytecode using Format 1 of the JVM spec: an opcode and two index bytes.

protected void
setByteCodeOperandsFormat2(final int
int should be 132
instruction
,
final ByteCode
ByteCode whose rewrite array should be updated
byteCode
,
final OperandManager
OperandManager source of the operands
operandManager
,
final int
ignored
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.

Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.forms.VariableInstructionForm:
setRewrite2BytessetRewrite4BytessetRewrite4Bytes

Constructor Detail

WideFormback to summary
public WideForm(final int opcode, final String name)

Method Detail

setByteCodeOperandsback to summary
public void setByteCodeOperands(final ByteCode byteCode, final OperandManager operandManager, final int codeLength)

Implements abstract org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm.setByteCodeOperands.

Doc from org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm.setByteCodeOperands.

When passed a byteCode, an OperandTable and a SegmentConstantPool, this method will set the rewrite of the byteCode appropriately.

Parameters
byteCode:ByteCode

ByteCode to be updated (!)

operandManager:OperandManager

OperandTable from which to draw info

codeLength:int

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).

Annotations
@Override
setByteCodeOperandsFormat1back to summary
protected void setByteCodeOperandsFormat1(final int instruction, final ByteCode byteCode, final OperandManager operandManager, final 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:int

should be 132

byteCode:ByteCode

the byte code whose rewrite array should be updated

operandManager:OperandManager

the source of the operands

codeLength:int

ignored

setByteCodeOperandsFormat2back to summary
protected void setByteCodeOperandsFormat2(final int instruction, final ByteCode byteCode, final OperandManager operandManager, final 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

int should be 132

byteCode:ByteCode

ByteCode whose rewrite array should be updated

operandManager:OperandManager

OperandManager source of the operands

codeLength:int

ignored