Package org.jboss.classfilewriter.code
Class StackEntry
- java.lang.Object
-
- org.jboss.classfilewriter.code.StackEntry
-
public class StackEntry extends java.lang.Objectrepresents 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.Stringdescriptorprivate intdescriptorIndexif this is OBJECT then this holds the const pool indexprivate intnewInstructionLocationif this is an unititialized bytecode then this holds the absolute position of the new instruction that created itprivate StackEntryTypetype
-
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.StringgetDescriptor()intgetNewInstructionLocation()StackEntryTypegetType()booleanisWide()static StackEntryof(java.lang.String descriptor, ConstPool pool)java.lang.StringtoString()voidwrite(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:
toStringin 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.IOExceptionwrites the entry to the stream- Throws:
java.io.IOException
-
-