-
- All Known Implementing Classes:
Invocation.Build,Invocation.Call,Invocation.Run
public interface Invocation
Method invocation using inMethodInterceptor.invoke(Invocation)for Aspects.Represents a method invocation that can be intercepted with additional before and after invocation logic.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classInvocation.Build<T>Builds Invocation for both callable and runnable methods.static classInvocation.Call<T>Callable based Invocation with checked exceptions.static interfaceInvocation.CheckedRunnableRunnable with checked exceptions.static interfaceInvocation.CheckedSupplier<T>Callable with checked exceptions.static classInvocation.RunRunnable based Invocation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object[]arguments()Return the arguments used for this invocation.Object[]arguments(Throwable e)Return the arguments additionally appending the throwable.Objectinstance()Return the 'this' instance of the invocation.Objectinvoke()Invoke the underlying method returning the result.Methodmethod()Return the method being called for this invocation.voidresult(Object result)Set the result that will be returned to the caller.
-
-
-
Method Detail
-
invoke
Object invoke() throws Throwable
Invoke the underlying method returning the result.This will return null for void methods.
- Throws:
Throwable
-
result
void result(Object result)
Set the result that will be returned to the caller.This will replace a prior result set by calling
#invokeor can be used to provide a result allowing to skip calling#invokealtogether.- Parameters:
result- The result that will be returned to the caller.
-
arguments
Object[] arguments(Throwable e)
Return the arguments additionally appending the throwable.
-
-