Package org.jboss.classfilewriter.code
Class StackState
- java.lang.Object
-
- org.jboss.classfilewriter.code.StackState
-
public class StackState extends java.lang.ObjectIn immutable stack state, which may be shared between frames
-
-
Field Summary
Fields Modifier and Type Field Description private ConstPoolconstPoolprivate java.util.List<StackEntry>contentsThe contents of the stack
-
Constructor Summary
Constructors Modifier Constructor Description StackState(java.lang.String exceptionType, ConstPool constPool)privateStackState(java.util.List<StackEntry> contents, ConstPool constPool)StackState(ConstPool constPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackStateaconstNull()StackStateconstructorCall(int initializedValueStackPosition, StackEntry entry)StackStatedup()StackStatedup2()StackStatedup2X1()StackStatedup2X2()StackStatedupX1()StackStatedupX2()java.util.List<StackEntry>getContents()booleanisOnTop(java.lang.String descriptor)checks that the appropriate object type is on top of the stackprivate StackStatenewStack(StackEntry... pushValues)StackStatepop(int no)pop a non-wide type from the top of the stackStackStatepush(java.lang.String type)push a type on to the top of the stackStackStatepush(StackEntry entry)push a type on to the top of the stackintsize()StackStateswap()StackEntrytop()StackEntrytop_1()StackEntrytop_2()StackEntrytop_3()java.lang.StringtoString()StackStateupdateMerged(int pos, StackEntry frame)
-
-
-
Field Detail
-
contents
private final java.util.List<StackEntry> contents
The contents of the stackThis list may be shared between frames, so it must never be modified
The very first element represents the bottom of the stack, with the last element representing the top. Wide elements are stored as Wide, Top, with the
StackEntryType.TOPon the top of the stack
-
constPool
private final ConstPool constPool
-
-
Constructor Detail
-
StackState
public StackState(ConstPool constPool)
-
StackState
public StackState(java.lang.String exceptionType, ConstPool constPool)
-
StackState
private StackState(java.util.List<StackEntry> contents, ConstPool constPool)
-
-
Method Detail
-
isOnTop
public boolean isOnTop(java.lang.String descriptor)
checks that the appropriate object type is on top of the stack
-
size
public int size()
-
push
public StackState push(java.lang.String type)
push a type on to the top of the stack
-
push
public StackState push(StackEntry entry)
push a type on to the top of the stack
-
aconstNull
public StackState aconstNull()
-
pop
public StackState pop(int no)
pop a non-wide type from the top of the stack
-
dup
public StackState dup()
-
dupX1
public StackState dupX1()
-
dupX2
public StackState dupX2()
-
dup2
public StackState dup2()
-
dup2X1
public StackState dup2X1()
-
dup2X2
public StackState dup2X2()
-
newStack
private StackState newStack(StackEntry... pushValues)
-
top
public StackEntry top()
-
top_1
public StackEntry top_1()
-
top_2
public StackEntry top_2()
-
top_3
public StackEntry top_3()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getContents
public java.util.List<StackEntry> getContents()
-
constructorCall
public StackState constructorCall(int initializedValueStackPosition, StackEntry entry)
-
updateMerged
public StackState updateMerged(int pos, StackEntry frame)
-
swap
public StackState swap()
-
-