Class BeanDeserializerBuilder

  • public class BeanDeserializerBuilder
    extends Object
    Builder class used for aggregating deserialization information about a POJO, in order to build a JsonDeserializer for deserializing instances.
    • Method Detail

      • addOrReplaceProperty

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

        public 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.
      • addIgnorable

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

        public void addIncludable​(String propName)
        Method that will add property name as one of the properties that will be included.
      • addCreatorProperty

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

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

      • setIgnoreUnknownProperties

        public void setIgnoreUnknownProperties​(boolean ignore)
      • setValueInstantiator

        public void setValueInstantiator​(ValueInstantiator inst)
      • setObjectIdReader

        public void setObjectIdReader​(ObjectIdReader r)
      • getProperties

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

        Note that properties are returned in order that properties are ordered (explictly, or by rule), which is the serialization order.

      • hasProperty

        public boolean hasProperty​(PropertyName propertyName)
      • hasIgnorable

        public boolean hasIgnorable​(String name)
      • buildAbstract

        public AbstractDeserializer buildAbstract()
        Alternate build method used when we must be using some form of abstract resolution, usually by using addition Type Id ("polymorphic deserialization")