Class LambdaSafe.Callback<C,A>
java.lang.Object
io.spring.initializr.generator.spring.util.LambdaSafe.Callback<C,A>
- Type Parameters:
C
- the callback typeA
- the primary argument type
- Enclosing class:
- LambdaSafe
Represents a single callback that can be invoked in a lambda safe way.
-
Method Summary
Modifier and TypeMethodDescriptionprotected final <R> LambdaSafe.InvocationResult<R>
void
Invoke the callback instance where the callback method returns void.<R> LambdaSafe.InvocationResult<R>
Invoke the callback instance where the callback method returns a result.
-
Method Details
-
invoke
Invoke the callback instance where the callback method returns void.- Parameters:
invoker
- the invoker used to invoke the callback
-
invokeAnd
Invoke the callback instance where the callback method returns a result.- Type Parameters:
R
- the result type- Parameters:
invoker
- the invoker used to invoke the callback- Returns:
- the result of the invocation (may be
LambdaSafe.InvocationResult.noResult()
if the callback was not invoked)
-
invoke
-