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 of stack items at a given
byte code offset. See CLDC specification 5.3.1.2.
See also https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.4
union stack_map_frame {
same_frame;
same_locals_1_stack_item_frame;
same_locals_1_stack_item_frame_extended;
chop_frame;
same_frame_extended;
append_frame;
full_frame;
}
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStackMapEntry(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 TypeMethodDescriptionvoidCalled by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()voiddump(DataOutputStream file) Dumps stack map entryintintintintvoidsetByteCodeOffset(int newOffset) voidsetConstantPool(ConstantPool constantPool) voidsetFrameType(int ft) voidsetNumberOfLocals(int n) Deprecated.Since 6.0voidsetNumberOfStackItems(int n) Deprecated.Since 6.0voidsetTypesOfLocals(StackMapType[] types) voidsetTypesOfStackItems(StackMapType[] types) toString()voidupdateByteCodeOffset(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)instead.DO NOT USE- Parameters:
byteCodeOffset- byte code offset.numberOfLocals- NOT USED.typesOfLocals- array ofStackMapTypes of locals.numberOfStackItems- NOT USED.typesOfStackItems- array otStackMapTypes of stack items.constantPool- the constant pool.
-
StackMapEntry
public StackMapEntry(int tag, int byteCodeOffset, StackMapType[] typesOfLocals, StackMapType[] typesOfStackItems, ConstantPool constantPool) Create an instance- Parameters:
tag- the frameType to use.byteCodeOffset- byte code offset.typesOfLocals- array ofStackMapTypes of locals.typesOfStackItems- array otStackMapTypes of stack items.constantPool- the constant pool.
-
-
Method Details
-
accept
-
copy
- Returns:
- deep copy of this object.
-
dump
Dumps stack map entry- Parameters:
file- Output file stream.- Throws:
IOException- if an I/O error occurs.
-
getByteCodeOffset
-
getConstantPool
- Returns:
- Constant pool used by this object.
-
getFrameType
-
getNumberOfLocals
-
getNumberOfStackItems
-
getTypesOfLocals
-
getTypesOfStackItems
-
setByteCodeOffset
-
setConstantPool
- Parameters:
constantPool- Constant pool to be used for this object.
-
setFrameType
-
setNumberOfLocals
Deprecated.Since 6.0 -
setNumberOfStackItems
Deprecated.Since 6.0 -
setTypesOfLocals
-
setTypesOfStackItems
-
toString
-
updateByteCodeOffset
Update the distance (as an offset delta) from this StackMap entry to the next. Note that this might cause the frame type to change. Note also that delta may be negative.- Parameters:
delta- offset delta.
-
StackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)instead.