org.apache.bcel.classfile
Class StackMapType
java.lang.Object
org.apache.bcel.classfile.StackMapType
- All Implemented Interfaces:
- Cloneable
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.
- Version:
- $Id: StackMapType.java 386056 2006-03-15 11:31:56Z tcurdt $
- See Also:
StackMapEntry
,
StackMap
,
Constants
StackMapType
public StackMapType(byte type,
int index,
ConstantPool constant_pool)
- Parameters:
type
- type tag as defined in the Constants interfaceindex
- index to constant pool, or byte code offset
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(DataOutputStream file)
throws IOException
- Dump type entries to file.
- Parameters:
file
- Output file stream
- Throws:
IOException
hasIndex
public final boolean hasIndex()
- Returns:
- true, if type is either ITEM_Object or ITEM_NewObject
toString
public final String toString()
- Overrides:
toString
in class 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.
Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.