Top Description Fields Constructors Methods
org.aspectj.apache.bcel.classfile

public final Class StackMapType

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.io.DataInputStream, .DataOutputStream, .IOException, org.aspectj.apache.bcel.Constants

This class represents the type of a local variable or item on stack used in the StackMap entries.
Author
M. Dahm
Version
$Id: StackMapType.java,v 1.3 2008/05/28 23:53:02 aclement Exp $
See Also
StackMapEntry, StackMap, Constants

Field Summary

Modifier and TypeField and Description
private ConstantPool
private int
private byte

Constructor Summary

AccessConstructor and Description
pack-priv
StackMapType(DataInputStream
Input stream
file
,
ConstantPool constant_pool)

Construct object from file stream.

public
StackMapType(byte
type tag as defined in the Constants interface
type
,
int
index to constant pool, or byte code offset
index
,
ConstantPool constant_pool)

Method Summary

Modifier and TypeMethod and Description
public StackMapType

Returns:

deep copy of this object
copy
()

public final void
dump(DataOutputStream
Output file stream
file
)

Dump type entries to file.

public final ConstantPool

Returns:

Constant pool used by this object.
getConstantPool
()

public int

Returns:

index to constant pool if type == ITEM_Object, or offset in byte code, if type == ITEM_NewObject, and -1 otherwise
getIndex
()

public byte
public final boolean

Returns:

true, if type is either ITEM_Object or ITEM_NewObject
hasIndex
()

private String
public final void
setConstantPool(ConstantPool
Constant pool to be used for this object.
constant_pool
)

public void
setIndex(int t)

public void
setType(byte t)

public final String

Returns:

String representation
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

constant_poolback to summary
private ConstantPool constant_pool
indexback to summary
private int index
typeback to summary
private byte type

Constructor Detail

StackMapTypeback to summary
pack-priv StackMapType(DataInputStream file, ConstantPool constant_pool) throws IOException

Construct object from file stream.

Parameters
file:DataInputStream

Input stream

StackMapTypeback to summary
public StackMapType(byte type, int index, ConstantPool constant_pool)
Parameters
type:byte

type tag as defined in the Constants interface

index:int

index to constant pool, or byte code offset

Method Detail

copyback to summary
public StackMapType copy()
Returns:StackMapType

deep copy of this object

dumpback to summary
public final void dump(DataOutputStream file) throws IOException

Dump type entries to file.

Parameters
file:DataOutputStream

Output file stream

getConstantPoolback to summary
public final ConstantPool getConstantPool()
Returns:ConstantPool

Constant pool used by this object.

getIndexback to summary
public int getIndex()
Returns:int

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

getTypeback to summary
public byte getType()
hasIndexback to summary
public final boolean hasIndex()
Returns:boolean

true, if type is either ITEM_Object or ITEM_NewObject

printIndexback to summary
private String printIndex()
setConstantPoolback to summary
public final void setConstantPool(ConstantPool constant_pool)
Parameters
constant_pool:ConstantPool

Constant pool to be used for this object.

setIndexback to summary
public void setIndex(int t)
setTypeback to summary
public void setType(byte t)
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

String representation