Package org.apache.bcel.classfile
Class StackMapType
java.lang.Object
org.apache.bcel.classfile.StackMapType
- All Implemented Interfaces:
Cloneable
This class represents the type of a local variable or item on stack used in the StackMap entries.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConstantPool
static final StackMapType[]
private int
private byte
-
Constructor Summary
ConstructorsConstructorDescriptionStackMapType
(byte type, int index, ConstantPool constantPool) StackMapType
(DataInput file, ConstantPool constantPool) Construct object from file stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate byte
checkType
(byte type) copy()
void
dump
(DataOutputStream file) Dump type entries to file.int
getIndex()
byte
getType()
boolean
hasIndex()
private String
void
setConstantPool
(ConstantPool constantPool) void
setIndex
(int index) void
setType
(byte type) toString()
-
Field Details
-
EMPTY_ARRAY
-
type
private byte type -
index
private int index -
constantPool
-
-
Constructor Details
-
StackMapType
- Parameters:
type
- type tag as defined in the Constants interfaceindex
- index to constant pool, or byte code offset
-
StackMapType
StackMapType(DataInput file, ConstantPool constantPool) throws IOException Construct object from file stream.- Parameters:
file
- Input stream- Throws:
IOException
- if an I/O error occurs.
-
-
Method Details
-
checkType
private byte checkType(byte type) -
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.
-
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 boolean hasIndex()- Returns:
- true, if type is either ITEM_Object or ITEM_NewObject
-
printIndex
-
setConstantPool
- Parameters:
constantPool
- Constant pool to be used for this object.
-
setIndex
public void setIndex(int index) -
setType
public void setType(byte type) -
toString
-