Class AbstractArgumentBinder<T>
java.lang.Object
io.micronaut.core.bind.annotation.AbstractArgumentBinder<T>
- Type Parameters:
T
- The argument type
- Direct Known Subclasses:
AbstractAnnotatedArgumentBinder
,CookieAnnotationBinder
,DefaultBodyAnnotationBinder
,HeaderAnnotationBinder
,PathVariableAnnotationBinder
,QueryValueArgumentBinder
,RequestAttributeAnnotationBinder
An abstract
AnnotatedArgumentBinder
implementation.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractArgumentBinder
(ConversionService conversionService) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ArgumentBinder.BindingResult<T>
doBind
(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String annotationValue) Do binding.protected ArgumentBinder.BindingResult<T>
doBind
(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String name, ArgumentBinder.BindingResult<T> defaultResult) Do binding.protected ArgumentBinder.BindingResult<T>
doConvert
(Object value, ArgumentConversionContext<T> context) Convert the value and return a binding result.protected ArgumentBinder.BindingResult<T>
doConvert
(Object value, ArgumentConversionContext<T> context, ArgumentBinder.BindingResult<T> defaultResult) Convert the value and return a binding result.doResolve
(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String name) Do resolve.protected String
getFallbackFormat
(Argument<?> argument)
-
Field Details
-
conversionService
-
-
Constructor Details
-
AbstractArgumentBinder
Constructor.- Parameters:
conversionService
- conversionService
-
-
Method Details
-
doBind
protected ArgumentBinder.BindingResult<T> doBind(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String annotationValue) Do binding.- Parameters:
context
- contextvalues
- valuesannotationValue
- annotationValue- Returns:
- result
-
doBind
protected ArgumentBinder.BindingResult<T> doBind(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String name, ArgumentBinder.BindingResult<T> defaultResult) Do binding.- Parameters:
context
- contextvalues
- valuesname
- annotationValuedefaultResult
- The default binding result if the value is null- Returns:
- result
-
doResolve
@Nullable protected @Nullable Object doResolve(ArgumentConversionContext<T> context, ConvertibleValues<?> values, String name) Do resolve.- Parameters:
context
- contextvalues
- valuesname
- annotationValue- Returns:
- result
-
getFallbackFormat
- Parameters:
argument
- The argument- Returns:
- The fallback format
-
doConvert
protected ArgumentBinder.BindingResult<T> doConvert(Object value, ArgumentConversionContext<T> context) Convert the value and return a binding result.- Parameters:
value
- The value to convertcontext
- The conversion context- Returns:
- The binding result
-
doConvert
protected ArgumentBinder.BindingResult<T> doConvert(Object value, ArgumentConversionContext<T> context, ArgumentBinder.BindingResult<T> defaultResult) Convert the value and return a binding result.- Parameters:
value
- The value to convertcontext
- The conversion contextdefaultResult
- The binding result if the value is null- Returns:
- The binding result
-