S
- The source typepublic class DefaultExecutableBinder<S> extends Object implements ExecutableBinder<S>
ExecutableBinder
interface.Constructor and Description |
---|
DefaultExecutableBinder()
Default constructor.
|
DefaultExecutableBinder(Map<Argument<?>,Object> preBound)
A map of pre-bound values for any arguments that don't need to be dynamically bound.
|
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. |
public <T,R> BoundExecutable<T,R> bind(Executable<T,R> target, ArgumentBinderRegistry<S> registry, S source) throws UnsatisfiedArgumentException
ExecutableBinder
Executable
using the given registry and source object.bind
in interface ExecutableBinder<S>
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 satisfiedpublic <T,R> BoundExecutable<T,R> tryBind(Executable<T,R> target, ArgumentBinderRegistry<S> registry, S source)
ExecutableBinder
Executable
using the given registry and source object. Unlike ExecutableBinder.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 boundtryBind
in interface ExecutableBinder<S>
T
- The executable target typeR
- The executable return typetarget
- The target executableregistry
- The registry to usesource
- The binding source