Package spin
Class Invocation
java.lang.Object
spin.Invocation
A single invocation on a Spin proxy handled by
Evaluators.-
Constructor Summary
ConstructorsConstructorDescriptionInvocation(Object object, Method method, Object[] args) Create an invocation of the given method on the given object with the given arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoidevaluate()Evaluate the return value (or a possibly thrownThrowable) by invoking to method with the arguments on the wrapped object.Object[]Get the arguments for the invoked method.Get the invoked method.Get the object this invocation is evaluated on.Get the result of evaluationGet the throwable thrown on evaluation.booleanTest if this invocation is already evaluated.Get the result or throwable of this invocation's evaluation.voidsetArguments(Object[] args) Set the arguments for the invoked method.voidSet the method to invoke.voidSet the object this invocation is evaluated on.voidSet the result of evaluationvoidsetThrowable(Throwable throwable) Set the throwable thrown on evaluation.
-
Constructor Details
-
Invocation
Create an invocation of the given method on the given object with the given arguments.- Parameters:
object- object to invoke method onmethod- method to invokeargs- arguments for the method invocation
-
-
Method Details
-
setObject
Set the object this invocation is evaluated on.- Parameters:
object- object to evaluate on
-
getObject
Get the object this invocation is evaluated on.- Returns:
- the object this invocation is evaluated on
-
setMethod
Set the method to invoke.- Parameters:
method- method to invoke
-
getMethod
Get the invoked method.- Returns:
- the invoked method
-
setArguments
Set the arguments for the invoked method.- Parameters:
args- the arguments for the invoked method
-
getArguments
Get the arguments for the invoked method.- Returns:
- the arguments for the invoked method
-
getResult
Get the result of evaluation- Returns:
- the result
-
setResult
Set the result of evaluation- Parameters:
result- the result
-
getThrowable
Get the throwable thrown on evaluation.- Returns:
- the throwable
-
setThrowable
Set the throwable thrown on evaluation.- Parameters:
throwable- the throwable
-
evaluate
public void evaluate()Evaluate the return value (or a possibly thrownThrowable) by invoking to method with the arguments on the wrapped object. -
isEvaluated
public boolean isEvaluated()Test if this invocation is already evaluated.- Returns:
trueif evaluation has finished
-
resultOrThrow
Get the result or throwable of this invocation's evaluation.- Returns:
- result result of evaluation
- Throws:
Throwable- throwable of evaluation
-