@Singleton public class DefaultRequestBinderRegistry extends Object implements RequestBinderRegistry
RequestBinderRegistry interface.| Constructor and Description |
|---|
DefaultRequestBinderRegistry(ConversionService conversionService,
List<RequestArgumentBinder> binders) |
DefaultRequestBinderRegistry(ConversionService conversionService,
RequestArgumentBinder... binders) |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<ArgumentBinder<T,HttpRequest<?>>> |
findArgumentBinder(Argument<T> argument,
HttpRequest<?> source)
Locate an
ArgumentBinder for the given argument and source type. |
protected <T> RequestArgumentBinder |
findBinder(Argument<T> argument,
Class<? extends Annotation> annotationType) |
protected void |
registerDefaultAnnotationBinders(Map<Class<? extends Annotation>,RequestArgumentBinder> byAnnotation) |
protected void |
registerDefaultConverters(ConversionService<?> conversionService)
Registers a default converter.
|
public DefaultRequestBinderRegistry(ConversionService conversionService, RequestArgumentBinder... binders)
conversionService - The conversion servicebinders - The request argument binders@Inject public DefaultRequestBinderRegistry(ConversionService conversionService, List<RequestArgumentBinder> binders)
conversionService - The conversion servicebinders - The request argument binderspublic <T> Optional<ArgumentBinder<T,HttpRequest<?>>> findArgumentBinder(Argument<T> argument, HttpRequest<?> source)
ArgumentBinderRegistryArgumentBinder for the given argument and source type.findArgumentBinder in interface ArgumentBinderRegistry<HttpRequest<?>>T - The argument typeargument - The argumentsource - The sourceOptional of ArgumentBinderprotected <T> RequestArgumentBinder findBinder(Argument<T> argument, Class<? extends Annotation> annotationType)
T - The typeargument - The argumentannotationType - The class for annotationprotected void registerDefaultConverters(ConversionService<?> conversionService)
conversionService - The conversion serviceprotected void registerDefaultAnnotationBinders(Map<Class<? extends Annotation>,RequestArgumentBinder> byAnnotation)
byAnnotation - The request argument binder