java.lang.Object
io.avaje.inject.aop.Invocation.Base<T>
- Type Parameters:
T- The result type
- All Implemented Interfaces:
Invocation
- Direct Known Subclasses:
Invocation.Call,Invocation.Run
- Enclosing interface:
Invocation
Invocation base type for both callable and runnable methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.avaje.inject.aop.Invocation
Invocation.Base<T>, Invocation.Call<T>, Invocation.CheckedRunnable, Invocation.CheckedSupplier<T>, Invocation.Run -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]Return the arguments used for this invocation.Object[]Return the arguments additionally appending the throwable.Return the final invocation result.instance()Return the 'this' instance of the invocation.method()Return the method being called for this invocation.voidSet the result that will be returned to the caller.Set the instance, method and arguments for the invocation.abstract Invocation.Base<T> wrap(MethodInterceptor methodInterceptor) Wrap this invocation using a methodInterceptor returning the wrapped call.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.avaje.inject.aop.Invocation
invoke, invokeUnchecked
-
Constructor Details
-
Base
public Base()
-
-
Method Details
-
with
Set the instance, method and arguments for the invocation. -
result
Description copied from interface:InvocationSet 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.- Specified by:
resultin interfaceInvocation- Parameters:
result- The result that will be returned to the caller.
-
finalResult
Return the final invocation result. -
arguments
Description copied from interface:InvocationReturn the arguments used for this invocation.- Specified by:
argumentsin interfaceInvocation
-
arguments
Description copied from interface:InvocationReturn the arguments additionally appending the throwable.- Specified by:
argumentsin interfaceInvocation
-
method
Description copied from interface:InvocationReturn the method being called for this invocation.- Specified by:
methodin interfaceInvocation
-
instance
Description copied from interface:InvocationReturn the 'this' instance of the invocation.This is typically used when invoking fallback/recovery methods.
- Specified by:
instancein interfaceInvocation
-
wrap
Wrap this invocation using a methodInterceptor returning the wrapped call.This invocation is effectively nested inside the returned invocation.
- Parameters:
methodInterceptor- The method interceptor to use to wrap this call with- Returns:
- The wrapped call
-