de.rwth.dfa.jvm.samples
Class CPAbstraction.PushConstantFunction
java.lang.Object
|
+--de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
|
+--de.rwth.dfa.jvm.samples.CPAbstraction.PushConstantFunction
- All Implemented Interfaces:
- Function
- Enclosing class:
- CPAbstraction
- protected class CPAbstraction.PushConstantFunction
- extends CPAbstraction.CPFunction
A function for pushing a constant onto the stack.
Field Summary |
protected java.lang.Object |
value
The constant to push. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
value
protected java.lang.Object value
- The constant to push.
CPAbstraction.PushConstantFunction
public CPAbstraction.PushConstantFunction(java.lang.Object value,
int consume,
int produce)
- Creates a new
PushConstantFunction
instance.
- Parameters:
value
- an Object
valueconsume
- an int
valueproduce
- an int
value
apply
protected void apply(java.lang.Object[] locals,
java.util.Stack stack)
throws FunctionException
- Pushes the constant after pushing as many
CFPComponentLattice.UNKNOWNCOMPONENT
as necessary to fulfill correct stack
behavior.
- 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