org.apache.bcel.classfile

Class StackMapType

public final class StackMapType extends Object implements Cloneable

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

See Also: StackMapEntry StackMap Constants

Constructor Summary
StackMapType(byte type, int index, ConstantPool constant_pool)
Method Summary
StackMapTypecopy()
voiddump(DataOutputStream file)
Dump type entries to file.
ConstantPoolgetConstantPool()
intgetIndex()
bytegetType()
booleanhasIndex()
voidsetConstantPool(ConstantPool constant_pool)
voidsetIndex(int t)
voidsetType(byte t)
StringtoString()

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

copy

public StackMapType copy()

Returns: deep copy of this object

dump

public final void dump(DataOutputStream file)
Dump type entries to file.

Parameters: file Output file stream

Throws: IOException

getConstantPool

public final ConstantPool getConstantPool()

Returns: Constant pool used by this object.

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

getType

public byte getType()

hasIndex

public final boolean hasIndex()

Returns: true, if type is either ITEM_Object or ITEM_NewObject

setConstantPool

public final void setConstantPool(ConstantPool constant_pool)

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

setIndex

public void setIndex(int t)

setType

public void setType(byte t)

toString

public final String toString()

Returns: String representation