S - The source typepublic interface ExecutableBinder<S>
An ExecutableBinder is capable of taking a target Executable and fulfilling the argument
requirements using the provided binding source and ArgumentBinderRegistry
The returned BoundExecutable will have all of the required arguments bound and
can then be called simply by calling invoke.
If an argument could not be bound then an exception will be
| Modifier and Type | Method and Description |
|---|---|
<T,R> BoundExecutable<T,R> |
bind(Executable<T,R> target,
ArgumentBinderRegistry<S> registry,
S source)
Binds a given
Executable using the given registry and source object. |
<T,R> BoundExecutable<T,R> |
tryBind(Executable<T,R> target,
ArgumentBinderRegistry<S> registry,
S source)
Binds a given
Executable using the given registry and source object. |
<T,R> BoundExecutable<T,R> bind(Executable<T,R> target, ArgumentBinderRegistry<S> registry, S source) throws UnsatisfiedArgumentException
Executable using the given registry and source object.T - The executable target typeR - The executable return typetarget - The target executableregistry - The registry to usesource - The binding sourceUnsatisfiedArgumentException - When the executable could not be satisfied<T,R> BoundExecutable<T,R> tryBind(Executable<T,R> target, ArgumentBinderRegistry<S> registry, S source)
Executable using the given registry and source object. Unlike bind(Executable, ArgumentBinderRegistry, Object) this
method will not throw an UnsatisfiedArgumentException if an argument cannot be bound. Instead the BoundExecutable.getUnboundArguments() property
will be populated with any arguments that could not be boundT - The executable target typeR - The executable return typetarget - The target executableregistry - The registry to usesource - The binding source