org.apache.bcel.classfile

Class StackMapEntry

public final class StackMapEntry extends Object implements 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
intbyte_code_offset
ConstantPoolconstant_pool
intnumber_of_locals
intnumber_of_stack_items
StackMapType[]types_of_locals
StackMapType[]types_of_stack_items
Constructor Summary
StackMapEntry(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
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(DataOutputStream file)
Dump stack map entry
intgetByteCodeOffset()
ConstantPoolgetConstantPool()
intgetNumberOfLocals()
intgetNumberOfStackItems()
StackMapType[]getTypesOfLocals()
StackMapType[]getTypesOfStackItems()
voidsetByteCodeOffset(int b)
voidsetConstantPool(ConstantPool constant_pool)
voidsetNumberOfLocals(int n)
voidsetNumberOfStackItems(int n)
voidsetTypesOfLocals(StackMapType[] t)
voidsetTypesOfStackItems(StackMapType[] t)
StringtoString()

Field Detail

byte_code_offset

private int byte_code_offset

constant_pool

private ConstantPool constant_pool

number_of_locals

private int number_of_locals

number_of_stack_items

private int number_of_stack_items

types_of_locals

private StackMapType[] types_of_locals

types_of_stack_items

private StackMapType[] types_of_stack_items

Constructor Detail

StackMapEntry

StackMapEntry(DataInputStream file, ConstantPool constant_pool)
Construct object from file stream.

Parameters: file Input stream

Throws: 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

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

copy

public StackMapEntry copy()

Returns: deep copy of this object

dump

public final void dump(DataOutputStream file)
Dump stack map entry

Parameters: file Output file stream

Throws: IOException

getByteCodeOffset

public int getByteCodeOffset()

getConstantPool

public final ConstantPool getConstantPool()

Returns: Constant pool used by this object.

getNumberOfLocals

public int getNumberOfLocals()

getNumberOfStackItems

public int getNumberOfStackItems()

getTypesOfLocals

public StackMapType[] getTypesOfLocals()

getTypesOfStackItems

public StackMapType[] getTypesOfStackItems()

setByteCodeOffset

public void setByteCodeOffset(int b)

setConstantPool

public final void setConstantPool(ConstantPool constant_pool)

Parameters: constant_pool Constant pool to be used for this object.

setNumberOfLocals

public void setNumberOfLocals(int n)

setNumberOfStackItems

public void setNumberOfStackItems(int n)

setTypesOfLocals

public void setTypesOfLocals(StackMapType[] t)

setTypesOfStackItems

public void setTypesOfStackItems(StackMapType[] t)

toString

public final String toString()

Returns: String representation.