Package org.apache.bcel.classfile
Class StackMapType
java.lang.Object
org.apache.bcel.classfile.StackMapType
This class represents the type of a local variable or item on stack used in the StackMap entries.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()
void
dump
(DataOutputStream file) Dump type entries to file.Gets the class name of this StackMapType from the constant pool at index position.int
getIndex()
byte
getType()
boolean
hasIndex()
void
setConstantPool
(ConstantPool constantPool) void
setIndex
(int index) void
setType
(byte type) toString()
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
StackMapType
- Parameters:
type
- type tag as defined in the Constants interfaceindex
- index to constant pool, or byte code offset
-
-
Method Details
-
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. -
copy
- Returns:
- deep copy of this object
-
dump
Dump type entries to file.- Parameters:
file
- Output file stream- Throws:
IOException
- if an I/O error occurs.
-
getClassName
Gets the class name of this StackMapType from the constant pool at index position.- Returns:
- the fully qualified name of the class for this StackMapType.
- Since:
- 6.8.0
-
getConstantPool
- Returns:
- Constant pool used by this object.
-
getIndex
- Returns:
- index to constant pool if type == ITEM_Object, or offset in byte code, if type == ITEM_NewObject, and -1 otherwise
-
getType
-
hasIndex
- Returns:
- true, if type is either ITEM_Object or ITEM_NewObject
-
setConstantPool
- Parameters:
constantPool
- Constant pool to be used for this object.
-
setIndex
-
setType
-
toString
-