Top Description Fields Constructors Methods
org.jboss.classfilewriter.code

public Class StackEntry

extends Object
Class Inheritance
Imports
java.io.DataOutputStream, .IOException, org.jboss.classfilewriter.constpool.ConstPool, org.jboss.classfilewriter.util.DescriptorUtils

represents the state of the stack or the local variable array.

This is written out as part of the StackMap attribute

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final String
private final int
descriptorIndex

if this is OBJECT then this holds the const pool index

private final int
newInstructionLocation

if this is an unititialized bytecode then this holds the absolute position of the new instruction that created it

private final StackEntryType

Constructor Summary

AccessConstructor and Description
public
StackEntry(StackEntryType type, String descriptor)

public
StackEntry(StackEntryType type, String descriptor, ConstPool pool)

public
StackEntry(StackEntryType type, String descriptor, int newInstructionLocation)

Method Summary

Modifier and TypeMethod and Description
public String
public int
public StackEntryType
public boolean
public static StackEntry
of(String descriptor, ConstPool pool)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
write(DataOutputStream dstream)

writes the entry to the stream

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

descriptorback to summary
private final String descriptor
descriptorIndexback to summary
private final int descriptorIndex

if this is OBJECT then this holds the const pool index

newInstructionLocationback to summary
private final int newInstructionLocation

if this is an unititialized bytecode then this holds the absolute position of the new instruction that created it

typeback to summary
private final StackEntryType type

Constructor Detail

StackEntryback to summary
public StackEntry(StackEntryType type, String descriptor)
StackEntryback to summary
public StackEntry(StackEntryType type, String descriptor, ConstPool pool)
StackEntryback to summary
public StackEntry(StackEntryType type, String descriptor, int newInstructionLocation)

Method Detail

getDescriptorback to summary
public String getDescriptor()
getNewInstructionLocationback to summary
public int getNewInstructionLocation()
getTypeback to summary
public StackEntryType getType()
isWideback to summary
public boolean isWide()
ofback to summary
public static StackEntry of(String descriptor, ConstPool pool)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
writeback to summary
public void write(DataOutputStream dstream) throws IOException

writes the entry to the stream