Package io.micronaut.context.bind
Class DefaultExecutableBeanContextBinder
java.lang.Object
io.micronaut.context.bind.DefaultExecutableBeanContextBinder
- All Implemented Interfaces:
ExecutableBeanContextBinder,ExecutableBinder<BeanContext>
public final class DefaultExecutableBeanContextBinder
extends Object
implements ExecutableBeanContextBinder
Implementation of
ExecutableBeanContextBinder.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T,R> BoundExecutable<T, R> bind(Executable<T, R> target, BeanContext source) Binds a givenExecutableusing the given registry and source object.<T,R> BoundExecutable<T, R> bind(Executable<T, R> target, ArgumentBinderRegistry<BeanContext> registry, BeanContext source) Binds a givenExecutableusing the given registry and source object.<T,R> BoundExecutable<T, R> tryBind(Executable<T, R> target, ArgumentBinderRegistry<BeanContext> registry, BeanContext source) Binds a givenExecutableusing the given registry and source object.
-
Constructor Details
-
DefaultExecutableBeanContextBinder
public DefaultExecutableBeanContextBinder()
-
-
Method Details
-
bind
public <T,R> BoundExecutable<T,R> bind(Executable<T, R> target, ArgumentBinderRegistry<BeanContext> registry, BeanContext source) throws UnsatisfiedArgumentExceptionDescription copied from interface:ExecutableBinderBinds a givenExecutableusing the given registry and source object.- Specified by:
bindin interfaceExecutableBinder<BeanContext>- Type Parameters:
T- The executable target typeR- The executable return type- Parameters:
target- The target executableregistry- The registry to usesource- The binding source- Returns:
- The bound executable
- Throws:
UnsatisfiedArgumentException- When the executable could not be satisfied
-
tryBind
public <T,R> BoundExecutable<T,R> tryBind(Executable<T, R> target, ArgumentBinderRegistry<BeanContext> registry, BeanContext source) Description copied from interface:ExecutableBinderBinds a givenExecutableusing the given registry and source object. UnlikeExecutableBinder.bind(Executable, ArgumentBinderRegistry, Object)this method will not throw anUnsatisfiedArgumentExceptionif an argument cannot be bound. Instead, theBoundExecutable.getUnboundArguments()property will be populated with any arguments that could not be bound- Specified by:
tryBindin interfaceExecutableBinder<BeanContext>- Type Parameters:
T- The executable target typeR- The executable return type- Parameters:
target- The target executableregistry- The registry to usesource- The binding source- Returns:
- The bound executable
-
bind
public <T,R> BoundExecutable<T,R> bind(Executable<T, R> target, BeanContext source) throws UnsatisfiedArgumentExceptionDescription copied from interface:ExecutableBeanContextBinderBinds a givenExecutableusing the given registry and source object.- Specified by:
bindin interfaceExecutableBeanContextBinder- Type Parameters:
T- The executable target typeR- The executable return type- Parameters:
target- The target executablesource- The bean context- Returns:
- The bound executable
- Throws:
UnsatisfiedArgumentException- When the executable could not be satisfied
-