APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.bcel.internal.classfile

public final Class StackMapType

extends Object
implements Node, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, com.sun.org.apache.bcel.internal.classfile.Node
Imports
java.io.DataInput, .DataOutputStream, .IOException, com.sun.org.apache.bcel.internal.Const

This class represents the type of a local variable or item on stack used in the StackMap entries.
See Also
StackMapEntry, StackMap, Const

Field Summary

Modifier and TypeField and Description
private ConstantPool
public static final StackMapType[]
private int
private byte

Constructor Summary

AccessConstructor and Description
public
StackMapType(final byte
type tag as defined in the Constants interface
type
,
final int
index to constant pool, or byte code offset
index
,
final ConstantPool constantPool)

pack-priv
StackMapType(final DataInput
Input stream
file
,
final ConstantPool constantPool)

Constructs object from file stream.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements com.sun.org.apache.bcel.internal.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.

private byte
checkType(final byte type)

public StackMapType
copy()

Returns: deep copy of this object

public void
dump(final DataOutputStream
Output file stream
file
)

Dump type entries to file.

public String

Returns:

the fully qualified name of the class for this StackMapType.
getClassName
()

Gets the class name of this StackMapType from the constant pool at index position.

public ConstantPool
getConstantPool()

Returns: Constant pool used by this object.

public int
getIndex()

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

public byte
public boolean
hasIndex()

Returns: true, if type is either ITEM_Object or ITEM_NewObject

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

public void
setIndex(final int index)

public void
setType(final byte type)

public 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

constantPoolback to summary
private ConstantPool constantPool
EMPTY_ARRAYback to summary
public static final StackMapType[] EMPTY_ARRAY
indexback to summary
private int index
typeback to summary
private byte type

Constructor Detail

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

type tag as defined in the Constants interface

index:int

index to constant pool, or byte code offset

StackMapTypeback to summary
pack-priv StackMapType(final DataInput file, final ConstantPool constantPool) throws IOException

Constructs object from file stream.

Parameters
file:DataInput

Input stream

Exceptions
IOException:
if an I/O error occurs.

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements com.sun.org.apache.bcel.internal.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters
v:Visitor

Visitor object

Annotations
@Override
Since
6.8.0
checkTypeback to summary
private byte checkType(final byte type)
copyback to summary
public StackMapType copy()
Returns:StackMapType

deep copy of this object

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

Dump type entries to file.

Parameters
file:DataOutputStream

Output file stream

Exceptions
IOException:
if an I/O error occurs.
getClassNameback to summary
public String getClassName()

Gets the class name of this StackMapType from the constant pool at index position.

Returns:String

the fully qualified name of the class for this StackMapType.

Since
6.8.0
getConstantPoolback to summary
public 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 boolean hasIndex()
Returns:boolean

true, if type is either ITEM_Object or ITEM_NewObject

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

Constant pool to be used for this object.

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

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

String representation

Annotations
@Override