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

public Class LabelForm

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

This class implements the byte code form for those bytecodes which have label references (and only label references).

Field Summary

Modifier and TypeField and Description
protected boolean
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm:
byteCodeArraybyteCodesByNameWIDENED

Constructor Summary

AccessConstructor and Description
public
LabelForm(final int opcode, final String name, final int[] rewrite)

public
LabelForm(final int opcode, final String name, final int[] rewrite, final boolean widened)

Method Summary

Modifier and TypeMethod and Description
public void
fixUpByteCodeTargets(final ByteCode
a ByteCode to be fixed up
byteCode
,
final CodeAttribute
a CodeAttribute used to determine how the ByteCode should be fixed up.
codeAttribute
)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm.fixUpByteCodeTargets.

The ByteCodeForm knows how to fix up a bytecode if it needs to be fixed up because it holds a Label bytecode.
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.
Inherited from org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm:
calculateOperandPositionfirstOperandIndexgetgetNamegetOpcodegetRewritegetRewriteCopyhasMultipleByteCodeshasNoOperandnestedMustStartClassPooloperandLengthtoString

Field Detail

widenedback to summary
protected boolean widened

Constructor Detail

LabelFormback to summary
public LabelForm(final int opcode, final String name, final int[] rewrite)
LabelFormback to summary
public LabelForm(final int opcode, final String name, final int[] rewrite, final boolean widened)

Method Detail

fixUpByteCodeTargetsback to summary
public void fixUpByteCodeTargets(final ByteCode byteCode, final CodeAttribute codeAttribute)

Overrides org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm.fixUpByteCodeTargets.

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

The ByteCodeForm knows how to fix up a bytecode if it needs to be fixed up because it holds a Label bytecode.

Parameters
byteCode:ByteCode

a ByteCode to be fixed up

codeAttribute:CodeAttribute

a CodeAttribute used to determine how the ByteCode should be fixed up.

Annotations
@Override
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