Package org.jboss.classfilewriter.code
Class StackEntry
- java.lang.Object
-
- org.jboss.classfilewriter.code.StackEntry
-
public class StackEntry extends java.lang.Object
represents the state of the stack or the local variable array.This is written out as part of the StackMap attribute
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
descriptor
private int
descriptorIndex
if this is OBJECT then this holds the const pool indexprivate int
newInstructionLocation
if this is an unititialized bytecode then this holds the absolute position of the new instruction that created itprivate StackEntryType
type
-
Constructor Summary
Constructors Constructor Description StackEntry(StackEntryType type, java.lang.String descriptor)
StackEntry(StackEntryType type, java.lang.String descriptor, int newInstructionLocation)
StackEntry(StackEntryType type, java.lang.String descriptor, ConstPool pool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescriptor()
int
getNewInstructionLocation()
StackEntryType
getType()
boolean
isWide()
static StackEntry
of(java.lang.String descriptor, ConstPool pool)
java.lang.String
toString()
void
write(java.io.DataOutputStream dstream)
writes the entry to the stream
-
-
-
Field Detail
-
type
private final StackEntryType type
-
descriptor
private final java.lang.String descriptor
-
descriptorIndex
private final int descriptorIndex
if this is OBJECT then this holds the const pool index
-
newInstructionLocation
private final int newInstructionLocation
if this is an unititialized bytecode then this holds the absolute position of the new instruction that created it
-
-
Constructor Detail
-
StackEntry
public StackEntry(StackEntryType type, java.lang.String descriptor)
-
StackEntry
public StackEntry(StackEntryType type, java.lang.String descriptor, ConstPool pool)
-
StackEntry
public StackEntry(StackEntryType type, java.lang.String descriptor, int newInstructionLocation)
-
-
Method Detail
-
getDescriptor
public java.lang.String getDescriptor()
-
getNewInstructionLocation
public int getNewInstructionLocation()
-
getType
public StackEntryType getType()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
of
public static StackEntry of(java.lang.String descriptor, ConstPool pool)
-
isWide
public boolean isWide()
-
write
public void write(java.io.DataOutputStream dstream) throws java.io.IOException
writes the entry to the stream- Throws:
java.io.IOException
-
-