org.apache.bcel.classfile
Class StackMapEntry

java.lang.Object
  extended by org.apache.bcel.classfile.StackMapEntry
All Implemented Interfaces:
java.lang.Cloneable

public final class StackMapEntry
extends java.lang.Object
implements 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

Version:
$Id: StackMapEntry.java 386056 2006-03-15 11:31:56Z tcurdt $
Author:
M. Dahm
See Also:
StackMap, StackMapType

Field Summary
private  int byte_code_offset
           
private  ConstantPool constant_pool
           
private  int number_of_locals
           
private  int number_of_stack_items
           
private  StackMapType[] types_of_locals
           
private  StackMapType[] types_of_stack_items
           
 
Constructor Summary
StackMapEntry(java.io.DataInputStream file, ConstantPool constant_pool)
          Construct object from file stream.
StackMapEntry(int byte_code_offset, int number_of_locals, StackMapType[] types_of_locals, int number_of_stack_items, StackMapType[] types_of_stack_items, ConstantPool constant_pool)
           
 
Method Summary
 void accept(Visitor v)
          Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 StackMapEntry copy()
           
 void dump(java.io.DataOutputStream file)
          Dump stack map entry
 int getByteCodeOffset()
           
 ConstantPool getConstantPool()
           
 int getNumberOfLocals()
           
 int getNumberOfStackItems()
           
 StackMapType[] getTypesOfLocals()
           
 StackMapType[] getTypesOfStackItems()
           
 void setByteCodeOffset(int b)
           
 void setConstantPool(ConstantPool constant_pool)
           
 void setNumberOfLocals(int n)
           
 void setNumberOfStackItems(int n)
           
 void setTypesOfLocals(StackMapType[] t)
           
 void setTypesOfStackItems(StackMapType[] t)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

byte_code_offset

private int byte_code_offset

number_of_locals

private int number_of_locals

types_of_locals

private StackMapType[] types_of_locals

number_of_stack_items

private int number_of_stack_items

types_of_stack_items

private StackMapType[] types_of_stack_items

constant_pool

private ConstantPool constant_pool
Constructor Detail

StackMapEntry

StackMapEntry(java.io.DataInputStream file,
              ConstantPool constant_pool)
        throws java.io.IOException
Construct object from file stream.

Parameters:
file - Input stream
Throws:
java.io.IOException

StackMapEntry

public StackMapEntry(int byte_code_offset,
                     int number_of_locals,
                     StackMapType[] types_of_locals,
                     int number_of_stack_items,
                     StackMapType[] types_of_stack_items,
                     ConstantPool constant_pool)
Method Detail

dump

public final void dump(java.io.DataOutputStream file)
                throws java.io.IOException
Dump stack map entry

Parameters:
file - Output file stream
Throws:
java.io.IOException

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String representation.

setByteCodeOffset

public void setByteCodeOffset(int b)

getByteCodeOffset

public int getByteCodeOffset()

setNumberOfLocals

public void setNumberOfLocals(int n)

getNumberOfLocals

public int getNumberOfLocals()

setTypesOfLocals

public void setTypesOfLocals(StackMapType[] t)

getTypesOfLocals

public StackMapType[] getTypesOfLocals()

setNumberOfStackItems

public void setNumberOfStackItems(int n)

getNumberOfStackItems

public int getNumberOfStackItems()

setTypesOfStackItems

public void setTypesOfStackItems(StackMapType[] t)

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.

Parameters:
v - Visitor object

getConstantPool

public final ConstantPool getConstantPool()
Returns:
Constant pool used by this object.

setConstantPool

public final void setConstantPool(ConstantPool constant_pool)
Parameters:
constant_pool - Constant pool to be used for this object.