public class BeanDeserializerBuilder extends Object
JsonDeserializer
for deserializing
intances.Modifier and Type | Field and Description |
---|---|
protected SettableAnyProperty |
_anySetter
Fallback setter used for handling any properties that are not
mapped to regular setters.
|
protected HashMap<String,SettableBeanProperty> |
_backRefProperties
Back-reference properties this bean contains (if any)
|
protected BasicBeanDescription |
_beanDesc |
protected HashSet<String> |
_ignorableProps
Set of names of properties that are recognized but are to be ignored for deserialization
purposes (meaning no exception is thrown, value is just skipped).
|
protected boolean |
_ignoreAllUnknown
Flag that can be set to ignore and skip unknown properties.
|
protected List<ValueInjector> |
_injectables
Value injectors for deserialization
|
protected HashMap<String,SettableBeanProperty> |
_properties
Properties to deserialize collected so far.
|
protected ValueInstantiator |
_valueInstantiator
Object that will handle value instantiation for the bean type.
|
Modifier | Constructor and Description |
---|---|
|
BeanDeserializerBuilder(BasicBeanDescription beanDesc) |
protected |
BeanDeserializerBuilder(BeanDeserializerBuilder src)
Copy constructor for sub-classes to use, when constructing
custom builder instances
|
Modifier and Type | Method and Description |
---|---|
void |
addBackReferenceProperty(String referenceName,
SettableBeanProperty prop)
Method called to add a property that represents so-called back reference;
reference that "points back" to object that has forward reference to
currently built bean.
|
void |
addCreatorProperty(BeanPropertyDefinition propDef)
Method called by deserializer factory, when a "creator property"
(something that is passed via constructor- or factory method argument;
instead of setter or field).
|
void |
addIgnorable(String propName)
Method that will add property name as one of properties that can
be ignored if not recognized.
|
void |
addInjectable(String propertyName,
JavaType propertyType,
Annotations contextAnnotations,
AnnotatedMember member,
Object valueId) |
void |
addOrReplaceProperty(SettableBeanProperty prop,
boolean allowOverride)
Method for adding a new property or replacing a property.
|
void |
addProperty(SettableBeanProperty prop)
Method to add a property setter.
|
JsonDeserializer<?> |
build(BeanProperty forProperty) |
Iterator<SettableBeanProperty> |
getProperties()
Method that allows accessing all properties that this
builder currently contains.
|
ValueInstantiator |
getValueInstantiator() |
boolean |
hasProperty(String propertyName) |
SettableBeanProperty |
removeProperty(String name) |
void |
setAnySetter(SettableAnyProperty s) |
void |
setIgnoreUnknownProperties(boolean ignore) |
void |
setValueInstantiator(ValueInstantiator inst) |
protected final BasicBeanDescription _beanDesc
protected final HashMap<String,SettableBeanProperty> _properties
Note: since 1.9.1, LinkedHashMap has been used, since preservation of order is actually important for some use cases.
protected List<ValueInjector> _injectables
protected HashMap<String,SettableBeanProperty> _backRefProperties
protected HashSet<String> _ignorableProps
protected ValueInstantiator _valueInstantiator
protected SettableAnyProperty _anySetter
protected boolean _ignoreAllUnknown
public BeanDeserializerBuilder(BasicBeanDescription beanDesc)
protected BeanDeserializerBuilder(BeanDeserializerBuilder src)
public void addOrReplaceProperty(SettableBeanProperty prop, boolean allowOverride)
public void addProperty(SettableBeanProperty prop)
IllegalArgumentException
.public void addBackReferenceProperty(String referenceName, SettableBeanProperty prop)
public void addInjectable(String propertyName, JavaType propertyType, Annotations contextAnnotations, AnnotatedMember member, Object valueId)
public void addIgnorable(String propName)
public void addCreatorProperty(BeanPropertyDefinition propDef)
Default implementation does not do anything; we may need to revisit this decision if these properties need to be available through accessors. For now, however, we just have to ensure that we don't try to resolve types that masked setter/field has (see [JACKSON-700] for details).
public void setAnySetter(SettableAnyProperty s)
public void setIgnoreUnknownProperties(boolean ignore)
public void setValueInstantiator(ValueInstantiator inst)
public Iterator<SettableBeanProperty> getProperties()
Note that properties are returned in order that properties are ordered (explictly, or by rule), which is the serialization order.
public boolean hasProperty(String propertyName)
public SettableBeanProperty removeProperty(String name)
public ValueInstantiator getValueInstantiator()
public JsonDeserializer<?> build(BeanProperty forProperty)