@Singleton @Primary public class JacksonBeanPropertyBinder extends java.lang.Object implements BeanPropertyBinder
ArgumentBinder capable of binding from an object from a map.ArgumentBinder.BindingResult<T>| Constructor and Description |
|---|
JacksonBeanPropertyBinder(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
JacksonConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
ArgumentBinder.BindingResult<java.lang.Object> |
bind(ArgumentConversionContext<java.lang.Object> context,
java.util.Map<java.lang.CharSequence,? super java.lang.Object> source)
Bind the given argument from the given source.
|
<T2> T2 |
bind(java.lang.Class<T2> type,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
Bind a new instance of the given type from the given source.
|
<T2> T2 |
bind(T2 object,
ArgumentConversionContext<T2> context,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
Bind an existing instance of the given type from the given source.
|
<T2> T2 |
bind(T2 object,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
Bind an existing instance of the given type from the given source.
|
protected ConversionErrorException |
newConversionError(java.lang.Object object,
java.lang.Exception e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, bind, bind, bindpublic JacksonBeanPropertyBinder(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
JacksonConfiguration configuration)
objectMapper - To read/write JSONconfiguration - The configuration for Jackson JSON parserpublic ArgumentBinder.BindingResult<java.lang.Object> bind(ArgumentConversionContext<java.lang.Object> context, java.util.Map<java.lang.CharSequence,? super java.lang.Object> source)
ArgumentBinderbind in interface ArgumentBinder<java.lang.Object,java.util.Map<java.lang.CharSequence,? super java.lang.Object>>context - The ArgumentConversionContextsource - The sourceOptional of the value. If no binding was possible Optional.empty()public <T2> T2 bind(java.lang.Class<T2> type,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
throws ConversionErrorException
BeanPropertyBinderbind in interface BeanPropertyBinderT2 - The generic typetype - The typesource - The sourceConversionErrorException - if the object cannot be boundpublic <T2> T2 bind(T2 object,
ArgumentConversionContext<T2> context,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
BeanPropertyBinderbind in interface BeanPropertyBinderT2 - The generic typeobject - The beancontext - The conversion contextsource - The sourcepublic <T2> T2 bind(T2 object,
java.util.Set<? extends java.util.Map.Entry<? extends java.lang.CharSequence,java.lang.Object>> source)
throws ConversionErrorException
BeanPropertyBinderbind in interface BeanPropertyBinderT2 - The generic typeobject - The beansource - The sourceConversionErrorException - if the object cannot be boundprotected ConversionErrorException newConversionError(java.lang.Object object, java.lang.Exception e)
object - The beane - The exception object