|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.deser.BeanDeserializerBuilder
public class BeanDeserializerBuilder
Builder class used for aggregating deserialization information about
a POJO, in order to build a JsonDeserializer
for deserializing
instances.
Field Summary | |
---|---|
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 BeanDescription |
_beanDesc
|
protected JsonPOJOBuilder.Value |
_builderConfig
In addition, Builder may have additional configuration |
protected AnnotatedMethod |
_buildMethod
When creating Builder-based deserializers, this indicates method to call on builder to finalize value. |
protected boolean |
_defaultViewInclusion
|
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 ObjectIdReader |
_objectIdReader
|
protected Map<String,SettableBeanProperty> |
_properties
Properties to deserialize collected so far. |
protected ValueInstantiator |
_valueInstantiator
Object that will handle value instantiation for the bean type. |
Constructor Summary | |
---|---|
|
BeanDeserializerBuilder(BeanDescription beanDesc,
DeserializationConfig config)
|
protected |
BeanDeserializerBuilder(BeanDeserializerBuilder src)
Copy constructor for sub-classes to use, when constructing custom builder instances |
Method Summary | |
---|---|
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)
Deprecated. since 2.1, override addCreatorProperty(SettableBeanProperty) instead. |
void |
addCreatorProperty(SettableBeanProperty prop)
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. |
BeanDeserializer |
build()
Method for constructing a BeanDeserializer , given all
information collected. |
AbstractDeserializer |
buildAbstract()
Alternate build method used when we must be using some form of abstract resolution, usually by using addition Type Id ("polymorphic deserialization") |
JsonDeserializer<?> |
buildBuilderBased(JavaType valueType,
String expBuildMethodName)
Method for constructing a specialized deserializer that uses additional external Builder object during data binding. |
SettableBeanProperty |
findProperty(String propertyName)
|
SettableAnyProperty |
getAnySetter()
|
JsonPOJOBuilder.Value |
getBuilderConfig()
|
AnnotatedMethod |
getBuildMethod()
|
List<ValueInjector> |
getInjectables()
|
ObjectIdReader |
getObjectIdReader()
|
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 |
setObjectIdReader(ObjectIdReader r)
|
void |
setPOJOBuilder(AnnotatedMethod buildMethod,
JsonPOJOBuilder.Value config)
|
void |
setValueInstantiator(ValueInstantiator inst)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final BeanDescription _beanDesc
protected final boolean _defaultViewInclusion
protected final Map<String,SettableBeanProperty> _properties
protected List<ValueInjector> _injectables
protected HashMap<String,SettableBeanProperty> _backRefProperties
protected HashSet<String> _ignorableProps
protected ValueInstantiator _valueInstantiator
protected ObjectIdReader _objectIdReader
protected SettableAnyProperty _anySetter
protected boolean _ignoreAllUnknown
protected AnnotatedMethod _buildMethod
protected JsonPOJOBuilder.Value _builderConfig
Constructor Detail |
---|
public BeanDeserializerBuilder(BeanDescription beanDesc, DeserializationConfig config)
protected BeanDeserializerBuilder(BeanDeserializerBuilder src)
Method Detail |
---|
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(SettableBeanProperty prop)
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).
@Deprecated public void addCreatorProperty(BeanPropertyDefinition propDef)
addCreatorProperty(SettableBeanProperty)
instead.
public void setAnySetter(SettableAnyProperty s)
public void setIgnoreUnknownProperties(boolean ignore)
public void setValueInstantiator(ValueInstantiator inst)
public void setObjectIdReader(ObjectIdReader r)
public void setPOJOBuilder(AnnotatedMethod buildMethod, JsonPOJOBuilder.Value config)
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 SettableBeanProperty findProperty(String propertyName)
public boolean hasProperty(String propertyName)
public SettableBeanProperty removeProperty(String name)
public SettableAnyProperty getAnySetter()
public ValueInstantiator getValueInstantiator()
public List<ValueInjector> getInjectables()
public ObjectIdReader getObjectIdReader()
public AnnotatedMethod getBuildMethod()
public JsonPOJOBuilder.Value getBuilderConfig()
public BeanDeserializer build()
BeanDeserializer
, given all
information collected.
public AbstractDeserializer buildAbstract()
public JsonDeserializer<?> buildBuilderBased(JavaType valueType, String expBuildMethodName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |