Constructor and Description |
---|
Invocation(Object object,
Method method,
Object[] args)
Create an invocation of the given method on the given object with the
given arguments.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate()
Evaluate the return value (or a possibly thrown
Throwable )
by invoking to method with the arguments on the wrapped object. |
Object[] |
getArguments()
Get the arguments for the invoked method.
|
Method |
getMethod()
Get the invoked method.
|
Object |
getObject()
Get the object this invocation is evaluated on.
|
Object |
getResult()
Get the result of evaluation
|
Throwable |
getThrowable()
Get the throwable thrown on evaluation.
|
boolean |
isEvaluated()
Test if this invocation is already evaluated.
|
Object |
resultOrThrow()
Get the result or throwable of this invocation's evaluation.
|
void |
setArguments(Object[] args)
Set the arguments for the invoked method.
|
void |
setMethod(Method method)
Set the method to invoke.
|
void |
setObject(Object object)
Set the object this invocation is evaluated on.
|
void |
setResult(Object result)
Set the result of evaluation
|
void |
setThrowable(Throwable throwable)
Set the throwable thrown on evaluation.
|
public void setObject(Object object)
object
- object to evaluate onpublic Object getObject()
public void setMethod(Method method)
method
- method to invokepublic Method getMethod()
public void setArguments(Object[] args)
args
- the arguments for the invoked methodpublic Object[] getArguments()
public Object getResult()
public void setResult(Object result)
result
- the resultpublic Throwable getThrowable()
public void setThrowable(Throwable throwable)
throwable
- the throwablepublic void evaluate()
Throwable
)
by invoking to method with the arguments on the wrapped object.public boolean isEvaluated()
true
if evaluation has finishedCopyright © 2012. All Rights Reserved.