evaluate
public void evaluate()
Evaluate the return value (or a possibly thrown Throwable
)
by invoking to method with the arguments on the wrapped object.
getArguments
public Object[] getArguments()
Get the arguments for the invoked method.
- the arguments for the invoked method
getMethod
public Method getMethod()
Get the invoked method.
getObject
public Object getObject()
Get the object this invocation is evaluated on.
- the object this invocation is evaluated on
getResult
public Object getResult()
Get the result of evaluation
getThrowable
public Throwable getThrowable()
Get the throwable thrown on evaluation.
isEvaluated
public boolean isEvaluated()
Test if this invocation is already evaluated.
true
if evaluation has finished
resultOrThrow
public Object resultOrThrow()
throws Throwable
Get the result or throwable of this invocation's evaluation.
- result result of evaluation
setArguments
public void setArguments(Object[] args)
Set the arguments for the invoked method.
args
- the arguments for the invoked method
setMethod
public void setMethod(Method method)
Set the method to invoke.
method
- method to invoke
setObject
public void setObject(Object object)
Set the object this invocation is evaluated on.
object
- object to evaluate on
setResult
public void setResult(Object result)
Set the result of evaluation
setThrowable
public void setThrowable(Throwable throwable)
Set the throwable thrown on evaluation.
throwable
- the throwable