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.void
Set 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, wait
Methods 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:Invocation
Set the result that will be returned to the caller.This will replace a prior result set by calling
#invoke
or can be used to provide a result allowing to skip calling#invoke
altogether.- Specified by:
result
in interfaceInvocation
- Parameters:
result
- The result that will be returned to the caller.
-
finalResult
Return the final invocation result. -
arguments
Description copied from interface:Invocation
Return the arguments used for this invocation.- Specified by:
arguments
in interfaceInvocation
-
arguments
Description copied from interface:Invocation
Return the arguments additionally appending the throwable.- Specified by:
arguments
in interfaceInvocation
-
method
Description copied from interface:Invocation
Return the method being called for this invocation.- Specified by:
method
in interfaceInvocation
-
instance
Description copied from interface:Invocation
Return the 'this' instance of the invocation.This is typically used when invoking fallback/recovery methods.
- Specified by:
instance
in 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
-