Package org.apache.bcel.classfile
Class StackMapEntry
java.lang.Object
org.apache.bcel.classfile.StackMapEntry
This class represents a stack map entry recording the types of
local variables and the the of stack items at a given byte code offset.
See CLDC specification 5.3.1.2
- See Also:
-
Constructor Summary
ConstructorDescriptionStackMapEntry
(int byteCodeOffset, int numberOfLocals, StackMapType[] typesOfLocals, int numberOfStackItems, StackMapType[] typesOfStackItems, ConstantPool constantPool) Deprecated.StackMapEntry
(int tag, int byteCodeOffset, StackMapType[] typesOfLocals, StackMapType[] typesOfStackItems, ConstantPool constantPool) Create an instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.copy()
void
dump
(DataOutputStream file) Dump stack map entryint
int
int
int
void
setByteCodeOffset
(int new_offset) void
setConstantPool
(ConstantPool constantPool) void
setFrameType
(int f) void
setNumberOfLocals
(int n) Deprecated.since 6.0void
setNumberOfStackItems
(int n) Deprecated.since 6.0void
setTypesOfLocals
(StackMapType[] types) void
setTypesOfStackItems
(StackMapType[] types) toString()
void
updateByteCodeOffset
(int delta) Update the distance (as an offset delta) from this StackMap entry to the next.
-
Constructor Details
-
StackMapEntry
@Deprecated public StackMapEntry(int byteCodeOffset, int numberOfLocals, StackMapType[] typesOfLocals, int numberOfStackItems, StackMapType[] typesOfStackItems, ConstantPool constantPool) Deprecated.Since 6.0, useStackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)
insteadDO NOT USE- Parameters:
byteCodeOffset
-numberOfLocals
- NOT USEDtypesOfLocals
- array ofStackMapType
s of localsnumberOfStackItems
- NOT USEDtypesOfStackItems
- array otStackMapType
s of stack itemsconstantPool
- the constant pool
-
StackMapEntry
public StackMapEntry(int tag, int byteCodeOffset, StackMapType[] typesOfLocals, StackMapType[] typesOfStackItems, ConstantPool constantPool) Create an instance- Parameters:
tag
- the frameType to usebyteCodeOffset
-typesOfLocals
- array ofStackMapType
s of localstypesOfStackItems
- array otStackMapType
s of stack itemsconstantPool
- the constant pool
-
-
Method Details
-
dump
Dump stack map entry- Parameters:
file
- Output file stream- Throws:
IOException
-
toString
-
setFrameType
public void setFrameType(int f) -
getFrameType
public int getFrameType() -
setByteCodeOffset
public void setByteCodeOffset(int new_offset) -
updateByteCodeOffset
public void updateByteCodeOffset(int delta) Update the distance (as an offset delta) from this StackMap entry to the next. Note that this might cause the the frame type to change. Note also that delta may be negative.- Parameters:
delta
- offset delta
-
getByteCodeOffset
public int getByteCodeOffset() -
setNumberOfLocals
Deprecated.since 6.0 -
getNumberOfLocals
public int getNumberOfLocals() -
setTypesOfLocals
-
getTypesOfLocals
-
setNumberOfStackItems
Deprecated.since 6.0 -
getNumberOfStackItems
public int getNumberOfStackItems() -
setTypesOfStackItems
-
getTypesOfStackItems
-
copy
- Returns:
- deep copy of this object
-
accept
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
getConstantPool
- Returns:
- Constant pool used by this object.
-
setConstantPool
- Parameters:
constantPool
- Constant pool to be used for this object.
-
StackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)
instead