Package org.apache.bcel.classfile
Class StackMapEntry
- java.lang.Object
 - 
- org.apache.bcel.classfile.StackMapEntry
 
 
- 
- All Implemented Interfaces:
 java.lang.Cloneable,Node
public final class StackMapEntry extends java.lang.Object implements Node, java.lang.Cloneable
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:
 StackMap,StackMapType
 
- 
- 
Constructor Summary
Constructors Constructor Description StackMapEntry(int byteCodeOffset, int numberOfLocals, StackMapType[] typesOfLocals, int numberOfStackItems, StackMapType[] typesOfStackItems, ConstantPool constantPool)Deprecated.Since 6.0, useStackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)insteadStackMapEntry(int tag, int byteCodeOffset, StackMapType[] typesOfLocals, StackMapType[] typesOfStackItems, ConstantPool constantPool)Create an instance 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(Visitor v)Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.StackMapEntrycopy()voiddump(java.io.DataOutputStream file)Dump stack map entryintgetByteCodeOffset()ConstantPoolgetConstantPool()intgetFrameType()intgetNumberOfLocals()intgetNumberOfStackItems()StackMapType[]getTypesOfLocals()StackMapType[]getTypesOfStackItems()voidsetByteCodeOffset(int new_offset)voidsetConstantPool(ConstantPool constantPool)voidsetFrameType(int f)voidsetNumberOfLocals(int n)Deprecated.since 6.0voidsetNumberOfStackItems(int n)Deprecated.since 6.0voidsetTypesOfLocals(StackMapType[] types)voidsetTypesOfStackItems(StackMapType[] types)java.lang.StringtoString()voidupdateByteCodeOffset(int delta)Update the distance (as an offset delta) from this StackMap entry to the next. 
 - 
 
- 
- 
Constructor Detail
- 
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 ofStackMapTypes of localsnumberOfStackItems- NOT USEDtypesOfStackItems- array otStackMapTypes 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 ofStackMapTypes of localstypesOfStackItems- array otStackMapTypes of stack itemsconstantPool- the constant pool
 
 - 
 
- 
Method Detail
- 
dump
public void dump(java.io.DataOutputStream file) throws java.io.IOExceptionDump stack map entry- Parameters:
 file- Output file stream- Throws:
 java.io.IOException
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object- Returns:
 - String representation.
 
 
- 
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 public void setNumberOfLocals(int n)
Deprecated.since 6.0 
- 
getNumberOfLocals
public int getNumberOfLocals()
 
- 
setTypesOfLocals
public void setTypesOfLocals(StackMapType[] types)
 
- 
getTypesOfLocals
public StackMapType[] getTypesOfLocals()
 
- 
setNumberOfStackItems
@Deprecated public void setNumberOfStackItems(int n)
Deprecated.since 6.0 
- 
getNumberOfStackItems
public int getNumberOfStackItems()
 
- 
setTypesOfStackItems
public void setTypesOfStackItems(StackMapType[] types)
 
- 
getTypesOfStackItems
public StackMapType[] getTypesOfStackItems()
 
- 
copy
public StackMapEntry copy()
- Returns:
 - deep copy of this object
 
 
- 
accept
public void accept(Visitor v)
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
public ConstantPool getConstantPool()
- Returns:
 - Constant pool used by this object.
 
 
- 
setConstantPool
public void setConstantPool(ConstantPool constantPool)
- Parameters:
 constantPool- Constant pool to be used for this object.
 
 - 
 
 -