org.apache.bcel.classfile

Class StackMap

public final class StackMap extends Attribute implements Node

This class represents a stack map attribute used for preverification of Java classes for the Java 2 Micro Edition (J2ME). This attribute is used by the KVM and contained within the Code attribute of a method. See CLDC specification ยง5.3.1.2

See Also: Code StackMapEntry StackMapType

Constructor Summary
StackMap(int name_index, int length, StackMapEntry[] map, 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.
Attributecopy(ConstantPool _constant_pool)
voiddump(DataOutputStream file)
Dump line number table attribute to file stream in binary format.
intgetMapLength()
StackMapEntry[]getStackMap()
voidsetStackMap(StackMapEntry[] map)
StringtoString()

Constructor Detail

StackMap

public StackMap(int name_index, int length, StackMapEntry[] map, 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 Attribute copy(ConstantPool _constant_pool)

Returns: deep copy of this attribute

dump

public final void dump(DataOutputStream file)
Dump line number table attribute to file stream in binary format.

Parameters: file Output file stream

Throws: IOException

getMapLength

public final int getMapLength()

getStackMap

public final StackMapEntry[] getStackMap()

Returns: Array of stack map entries

setStackMap

public final void setStackMap(StackMapEntry[] map)

Parameters: map Array of stack map entries

toString

public final String toString()

Returns: String representation.