Package io.micronaut.core.bind
Interface ArgumentBinderRegistry<S>
- Type Parameters:
S
- type Generic
- All Known Subinterfaces:
RequestBinderRegistry
- All Known Implementing Classes:
DefaultRequestBinderRegistry
,NettyServerRequestBinderRegistry
,WebSocketStateBinderRegistry
public interface ArgumentBinderRegistry<S>
A registry of
ArgumentBinder
instances.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> void
addArgumentBinder
(ArgumentBinder<T, S> binder) Adds a request argument binder to the registry.default <T,
ST> void addRequestArgumentBinder
(ArgumentBinder<T, ST> binder) Deprecated, for removal: This API element is subject to removal in a future version.<T> Optional<ArgumentBinder<T,
S>> findArgumentBinder
(Argument<T> argument) Locate anArgumentBinder
for the given argument.default <T> Optional<ArgumentBinder<T,
S>> findArgumentBinder
(Argument<T> argument, S source) Deprecated, for removal: This API element is subject to removal in a future version.replaced withfindArgumentBinder(Argument)
-
Method Details
-
addRequestArgumentBinder
@Deprecated(since="4", forRemoval=true) default <T,ST> void addRequestArgumentBinder(ArgumentBinder<T, ST> binder) Deprecated, for removal: This API element is subject to removal in a future version.replaced withaddArgumentBinder(ArgumentBinder)
Adds a request argument binder to the registry.- Type Parameters:
T
- The argument typeST
- The source type- Parameters:
binder
- The binder- Since:
- 2.0
-
addArgumentBinder
Adds a request argument binder to the registry.- Type Parameters:
T
- The argument type- Parameters:
binder
- The binder- Since:
- 4.0.0
-
findArgumentBinder
@Deprecated(since="4", forRemoval=true) default <T> Optional<ArgumentBinder<T,S>> findArgumentBinder(Argument<T> argument, S source) Deprecated, for removal: This API element is subject to removal in a future version.replaced withfindArgumentBinder(Argument)
Locate anArgumentBinder
for the given argument and source type.- Type Parameters:
T
- The argument type- Parameters:
argument
- The argumentsource
- The source- Returns:
- An
Optional
ofArgumentBinder
-
findArgumentBinder
Locate anArgumentBinder
for the given argument.- Type Parameters:
T
- The argument type- Parameters:
argument
- The argument- Returns:
- An
Optional
ofArgumentBinder
- Since:
- 4.0.0
-
addArgumentBinder(ArgumentBinder)