de.rwth.dfa.jvm.samples
Class CPAbstraction.SwapFunction
java.lang.Object
|
+--de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
|
+--de.rwth.dfa.jvm.samples.CPAbstraction.SwapFunction
- All Implemented Interfaces:
- Function
- Enclosing class:
- CPAbstraction
- protected class CPAbstraction.SwapFunction
- extends CPAbstraction.CPFunction
Swaps the top element and the element below that on the stack.
Method Summary |
protected void |
apply(java.lang.Object[] locals,
java.util.Stack stack)
Swaps the top element and the element below that on the stack. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CPAbstraction.SwapFunction
public CPAbstraction.SwapFunction(int consume,
int produce)
- Creates a new
SwapFunction
instance.
- Parameters:
consume
- an int
valueproduce
- an int
value
apply
protected void apply(java.lang.Object[] locals,
java.util.Stack stack)
throws FunctionException
- Swaps the top element and the element below that on the stack.
- Overrides:
apply
in class CPAbstraction.CPFunction
- Parameters:
locals
- an Object[]
valuestack
- a Stack
value- Throws:
FunctionException
- if an error occurs
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object