korat.instrumentation.bytecode
Class OperandStack
java.lang.Object
korat.instrumentation.bytecode.OperandStack
public class OperandStack
- extends Object
- Author:
- Aleksandar Milicevic
opStack
private Stack<OperandStack.StackElem> opStack
Stack of the array object pushed onto the stack.
A stack like this has to be maintained because when you get to, let's
say, ARRAYLENGTH instruction, you cannot know which array it reffers to.
You would want to query the top of the stack and find out what's there,
but I don't think that javassist lets you do that. One solution is to
monitor (track) stack changes by yourself.
lastPoppedOut
private OperandStack.StackElem lastPoppedOut
OperandStack
public OperandStack()
getLastPoppedOut
public OperandStack.StackElem getLastPoppedOut()
push
public void push(OperandStack.StackElem elem)
push
public void push(CtClass elemType)
push
public void push(CtClass elemType,
OperandStack.ElemKind kind)
pop
public OperandStack.StackElem pop()
peek
public OperandStack.StackElem peek()
isEmpty
public boolean isEmpty()
clear
public void clear()
get
public OperandStack.StackElem get(int index)
size
public int size()
toString
public String toString()
- Overrides:
toString
in class Object
getClone
public OperandStack getClone()