Package org.apache.commons.compress.harmony.unpack200.bytecode.forms

# Class LabelForm

java.lang.Object
org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm
org.apache.commons.compress.harmony.unpack200.bytecode.forms.LabelForm

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `widened`

  ### Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm

  `byteCodeArray, byteCodesByName, WIDENED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LabelForm(int opcode, String name, int[] rewrite)`
  `LabelForm(int opcode, String name, int[] rewrite, boolean widened)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `fixUpByteCodeTargets(ByteCode byteCode, CodeAttribute codeAttribute)`
  The ByteCodeForm knows how to fix up a bytecode if it needs to be fixed up because it holds a Label bytecode.
  `void`
  `setByteCodeOperands(ByteCode byteCode, OperandManager operandManager, int codeLength)`
  When passed a byteCode, an OperandTable and a SegmentConstantPool, this method will set the rewrite of the byteCode appropriately.

  ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.forms.ByteCodeForm

  `calculateOperandPosition, firstOperandIndex, get, getName, getOpcode, getRewrite, getRewriteCopy, hasMultipleByteCodes, hasNoOperand, nestedMustStartClassPool, operandLength, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### widened

    protected boolean widened

- ## Constructor Details

  - ### LabelForm

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

  - ### LabelForm

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

- ## Method Details

  - ### fixUpByteCodeTargets

    public void fixUpByteCodeTargets(ByteCode byteCode, CodeAttribute codeAttribute)
    Description copied from class: `ByteCodeForm`
    The ByteCodeForm knows how to fix up a bytecode if it needs to be fixed up because it holds a Label bytecode.
    Overrides:
      `fixUpByteCodeTargets` in class `ByteCodeForm`
    Parameters:
      `byteCode` - a ByteCode to be fixed up
      `codeAttribute` - a CodeAttribute used to determine how the ByteCode should be fixed up.

  - ### setByteCodeOperands

    public void setByteCodeOperands(ByteCode byteCode, OperandManager operandManager, int codeLength)
    Description copied from class: `ByteCodeForm`
    When passed a byteCode, an OperandTable and a SegmentConstantPool, this method will set the rewrite of the byteCode appropriately.
    Specified by:
      `setByteCodeOperands` in class `ByteCodeForm`
    Parameters:
      `byteCode` - ByteCode to be updated (!)
      `operandManager` - OperandTable from which to draw info
      `codeLength` - 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).