org.codehaus.jackson.map.deser
Class BeanDeserializerBuilder

java.lang.Object
  extended by org.codehaus.jackson.map.deser.BeanDeserializerBuilder

public class BeanDeserializerBuilder
extends Object

Builder class used for aggregating deserialization information about a POJO, in order to build a JsonDeserializer for deserializing intances.

Since:
1.7

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  BasicBeanDescription _beanDesc
           
protected  CreatorContainer _creators
          Set of creators (constructors, factory methods) that bean type has.
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  HashMap<String,SettableBeanProperty> _properties
          Properties to deserialize collected so far.
 
Constructor Summary
BeanDeserializerBuilder(BasicBeanDescription beanDesc)
           
 
Method Summary
 void addBackReferenceProperty(String referenceName, SettableBeanProperty prop)
           
 void addIgnorable(String propName)
          Method that will add property name as one of properties that can be ignored if not recognized.
 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.
 boolean hasProperty(String propertyName)
           
 SettableBeanProperty removeProperty(String name)
           
 void setAnySetter(SettableAnyProperty s)
           
 void setCreators(CreatorContainer creators)
           
 void setIgnoreUnknownProperties(boolean ignore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_beanDesc

protected final BasicBeanDescription _beanDesc

_properties

protected final HashMap<String,SettableBeanProperty> _properties
Properties to deserialize collected so far.


_backRefProperties

protected HashMap<String,SettableBeanProperty> _backRefProperties
Back-reference properties this bean contains (if any)


_ignorableProps

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).


_creators

protected CreatorContainer _creators
Set of creators (constructors, factory methods) that bean type has.


_anySetter

protected SettableAnyProperty _anySetter
Fallback setter used for handling any properties that are not mapped to regular setters. If setter is not null, it will be called once for each such property.


_ignoreAllUnknown

protected boolean _ignoreAllUnknown
Flag that can be set to ignore and skip unknown properties. If set, will not throw an exception for unknown properties.

Constructor Detail

BeanDeserializerBuilder

public BeanDeserializerBuilder(BasicBeanDescription beanDesc)
Method Detail

setCreators

public void setCreators(CreatorContainer creators)

addOrReplaceProperty

public void addOrReplaceProperty(SettableBeanProperty prop,
                                 boolean allowOverride)
Method for adding a new property or replacing a property.


addProperty

public void addProperty(SettableBeanProperty prop)
Method to add a property setter. Will ensure that there is no unexpected override; if one is found will throw a IllegalArgumentException.


addBackReferenceProperty

public void addBackReferenceProperty(String referenceName,
                                     SettableBeanProperty prop)

addIgnorable

public void addIgnorable(String propName)
Method that will add property name as one of properties that can be ignored if not recognized.


getProperties

public Iterator<SettableBeanProperty> getProperties()
Method that allows accessing all properties that this builder currently contains.

Since:
1.8.3

hasProperty

public boolean hasProperty(String propertyName)

removeProperty

public SettableBeanProperty removeProperty(String name)

setAnySetter

public void setAnySetter(SettableAnyProperty s)

setIgnoreUnknownProperties

public void setIgnoreUnknownProperties(boolean ignore)

build

public JsonDeserializer<?> build(BeanProperty forProperty)