## org.apache.bcel.classfile
Class StackMapType

    java.lang.Object
      |
      +--org.apache.bcel.classfile.StackMapType

All Implemented Interfaces:
  java.lang.Cloneable

public final class StackMapType
extends java.lang.Object
implements java.lang.Cloneable

This class represents the type of a local variable or item on stack used in the StackMap entries.

Version:
  $Id: StackMapType.java,v 1.1.1.1 2001/10/29 20:00:03 jvanzyl Exp $
Author:
  M. Dahm
See Also:
  `StackMapEntry`, `StackMap`, `Constants`

Constructor Summary
`StackMapType(byte type, int index, ConstantPool constant_pool)`

Method Summary
`StackMapType` `copy()`
`void` `dump(java.io.DataOutputStream file)` Dump type entries to file.
`ConstantPool` `getConstantPool()`
`int` `getIndex()`
`byte` `getType()`
`boolean` `hasIndex()`
`void` `setConstantPool(ConstantPool constant_pool)`
`void` `setIndex(int t)`
`void` `setType(byte t)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StackMapType

    public StackMapType(byte type,
                        int index,
                        ConstantPool constant_pool)

  Parameters:
    `type` - type tag as defined in the Constants interface
    `index` - index to constant pool, or byte code offset

Method Detail

### setType

    public void setType(byte t)

### getType

    public byte getType()

### setIndex

    public void setIndex(int t)

### getIndex

    public int getIndex()

  Returns:
    index to constant pool if type == ITEM_Object, or offset in byte code, if type == ITEM_NewObject, and -1 otherwise

### dump

    public final void dump(java.io.DataOutputStream file)
                    throws java.io.IOException

  Dump type entries to file.
  Parameters:
    `file` - Output file stream

### hasIndex

    public final boolean hasIndex()

  Returns:
    true, if type is either ITEM_Object or ITEM_NewObject

### toString

    public final java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    String representation

### copy

    public StackMapType copy()

  Returns:
    deep copy of this object

### getConstantPool

    public final ConstantPool getConstantPool()

  Returns:
    Constant pool used by this object.

### setConstantPool

    public final void setConstantPool(ConstantPool constant_pool)

  Parameters:
    `constant_pool` - Constant pool to be used for this object.