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

# Class NarrowClassRefForm

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
org.apache.commons.compress.harmony.unpack200.bytecode.forms.NarrowClassRefForm

public class NarrowClassRefForm extends ClassRefForm
This class is used for representations of cldc and cldc_w. In these cases, a narrow class ref has one byte and a wide class ref has two bytes.

- ## Field Summary

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

  `widened`

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

  `byteCodeArray, byteCodesByName, WIDENED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NarrowClassRefForm(int opcode, String name, int[] rewrite)`
  Constructs a new instance with the specified opcode, name, operandType and rewrite.
  `NarrowClassRefForm(int opcode, String name, int[] rewrite, boolean widened)`
  Constructs a new instance with the specified opcode, name, operandType and rewrite.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `nestedMustStartClassPool()`
  `protected void`
  `setNestedEntries(ByteCode byteCode, OperandManager operandManager, int offset)`
  Sets the nested entries.

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

  `getOffset, getPoolID`

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

  `setByteCodeOperands`

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

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

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

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

- ## Constructor Details

  - ### NarrowClassRefForm

    public NarrowClassRefForm(int opcode, String name, int[] rewrite)
    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.

  - ### NarrowClassRefForm

    public NarrowClassRefForm(int opcode, String name, int[] rewrite, boolean widened)
    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

  - ### nestedMustStartClassPool

    public boolean nestedMustStartClassPool()
    Overrides:
      `nestedMustStartClassPool` in class `ByteCodeForm`

  - ### setNestedEntries

    protected void setNestedEntries(ByteCode byteCode, OperandManager operandManager, int offset) throws Pack200Exception
    Description copied from class: `ReferenceForm`
    Sets the nested entries.
    Overrides:
      `setNestedEntries` in class `ClassRefForm`
    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`].