|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.DeserializerFactory
public abstract class DeserializerFactory
Abstract class that defines API used by DeserializerProvider
to obtain actual
JsonDeserializer
instances from multiple distinct factories.
Since there are multiple broad categories of deserializers, there are multiple factory methods:
createArrayDeserializer(org.codehaus.jackson.map.DeserializationConfig, org.codehaus.jackson.map.DeserializerProvider, org.codehaus.jackson.map.type.ArrayType, org.codehaus.jackson.map.BeanProperty)
)
and the other for other Java containers like List
s
and Set
s (createCollectionDeserializer(DeserializationConfig, DeserializerProvider, CollectionType, BeanProperty)
)
Map
s
(createMapDeserializer(org.codehaus.jackson.map.DeserializationConfig, org.codehaus.jackson.map.DeserializerProvider, org.codehaus.jackson.map.type.MapType, org.codehaus.jackson.map.BeanProperty)
), and another for POJOs
(createBeanDeserializer(DeserializationConfig, DeserializerProvider, JavaType, BeanProperty)
.
JsonNode
) properties there is
createTreeDeserializer(DeserializationConfig, DeserializerProvider, JavaType, BeanProperty)
Enum
) there is
createEnumDeserializer(DeserializationConfig, DeserializerProvider, JavaType, BeanProperty)
createBeanDeserializer(DeserializationConfig, DeserializerProvider, JavaType, BeanProperty)
is used.
All above methods take 2 type arguments, except for the first one which takes just a single argument.
Nested Class Summary | |
---|---|
static class |
DeserializerFactory.Config
Configuration settings container class for bean deserializer factory |
Field Summary | |
---|---|
protected static Deserializers[] |
NO_DESERIALIZERS
|
Constructor Summary | |
---|---|
DeserializerFactory()
|
Method Summary | |
---|---|
JsonDeserializer<?> |
createArrayDeserializer(DeserializationConfig config,
ArrayType type,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
abstract JsonDeserializer<?> |
createArrayDeserializer(DeserializationConfig config,
DeserializerProvider p,
ArrayType type,
BeanProperty property)
Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert JSON content into values of specified Java type. |
abstract JsonDeserializer<Object> |
createBeanDeserializer(DeserializationConfig config,
DeserializerProvider p,
JavaType type,
BeanProperty property)
Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert JSON content into values of specified Java "bean" (POJO) type. |
JsonDeserializer<Object> |
createBeanDeserializer(DeserializationConfig config,
JavaType type,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
JsonDeserializer<?> |
createCollectionDeserializer(DeserializationConfig config,
CollectionType type,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
abstract JsonDeserializer<?> |
createCollectionDeserializer(DeserializationConfig config,
DeserializerProvider p,
CollectionType type,
BeanProperty property)
|
abstract JsonDeserializer<?> |
createCollectionLikeDeserializer(DeserializationConfig config,
DeserializerProvider p,
CollectionLikeType type,
BeanProperty property)
|
JsonDeserializer<?> |
createEnumDeserializer(DeserializationConfig config,
Class<?> enumClass,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
abstract JsonDeserializer<?> |
createEnumDeserializer(DeserializationConfig config,
DeserializerProvider p,
JavaType type,
BeanProperty property)
|
KeyDeserializer |
createKeyDeserializer(DeserializationConfig config,
JavaType type,
BeanProperty property)
Method called to find if factory knows how to create a key deserializer for specified type; currently this means checking if a module has registered possible deserializers. |
abstract JsonDeserializer<?> |
createMapDeserializer(DeserializationConfig config,
DeserializerProvider p,
MapType type,
BeanProperty property)
|
JsonDeserializer<?> |
createMapDeserializer(DeserializationConfig config,
MapType type,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
abstract JsonDeserializer<?> |
createMapLikeDeserializer(DeserializationConfig config,
DeserializerProvider p,
MapLikeType type,
BeanProperty property)
|
JsonDeserializer<?> |
createTreeDeserializer(DeserializationConfig config,
Class<? extends JsonNode> nodeClass,
DeserializerProvider p)
Deprecated. Since 1.7 should use method that takes in property definition |
abstract JsonDeserializer<?> |
createTreeDeserializer(DeserializationConfig config,
DeserializerProvider p,
JavaType type,
BeanProperty property)
Method called to create and return a deserializer that can construct JsonNode(s) from JSON content. |
TypeDeserializer |
findTypeDeserializer(DeserializationConfig config,
JavaType baseType)
Deprecated. Since 1.7 should use method that takes in property definition |
TypeDeserializer |
findTypeDeserializer(DeserializationConfig config,
JavaType baseType,
BeanProperty property)
Method called to find and create a type information deserializer for given base type, if one is needed. |
abstract DeserializerFactory.Config |
getConfig()
|
DeserializerFactory |
withAbstractTypeResolver(AbstractTypeResolver resolver)
Convenience method for creating a new factory instance with additional AbstractTypeResolver . |
DeserializerFactory |
withAdditionalDeserializers(Deserializers additional)
Convenience method for creating a new factory instance with additional deserializer provider. |
DeserializerFactory |
withAdditionalKeyDeserializers(KeyDeserializers additional)
Convenience method for creating a new factory instance with additional KeyDeserializers . |
abstract DeserializerFactory |
withConfig(DeserializerFactory.Config config)
Method used for creating a new instance of this factory, but with different configuration. |
DeserializerFactory |
withDeserializerModifier(BeanDeserializerModifier modifier)
Convenience method for creating a new factory instance with additional BeanDeserializerModifier . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Deserializers[] NO_DESERIALIZERS
Constructor Detail |
---|
public DeserializerFactory()
Method Detail |
---|
public abstract DeserializerFactory.Config getConfig()
public abstract DeserializerFactory withConfig(DeserializerFactory.Config config)
Note that custom sub-classes must override implementation
of this method, as it usually requires instantiating a new instance of
factory type. Check out javadocs for
BeanDeserializerFactory
for more details.
public final DeserializerFactory withAdditionalDeserializers(Deserializers additional)
public final DeserializerFactory withAdditionalKeyDeserializers(KeyDeserializers additional)
KeyDeserializers
.
public final DeserializerFactory withDeserializerModifier(BeanDeserializerModifier modifier)
BeanDeserializerModifier
.
public final DeserializerFactory withAbstractTypeResolver(AbstractTypeResolver resolver)
AbstractTypeResolver
.
public abstract JsonDeserializer<Object> createBeanDeserializer(DeserializationConfig config, DeserializerProvider p, JavaType type, BeanProperty property) throws JsonMappingException
type
- Type to be deserializedp
- Provider that can be called to create deserializers for
contained member types
JsonMappingException
public abstract JsonDeserializer<?> createArrayDeserializer(DeserializationConfig config, DeserializerProvider p, ArrayType type, BeanProperty property) throws JsonMappingException
type
- Type to be deserializedp
- Provider that can be called to create deserializers for
contained member types
JsonMappingException
public abstract JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig config, DeserializerProvider p, CollectionType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public abstract JsonDeserializer<?> createCollectionLikeDeserializer(DeserializationConfig config, DeserializerProvider p, CollectionLikeType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public abstract JsonDeserializer<?> createEnumDeserializer(DeserializationConfig config, DeserializerProvider p, JavaType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public abstract JsonDeserializer<?> createMapDeserializer(DeserializationConfig config, DeserializerProvider p, MapType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public abstract JsonDeserializer<?> createMapLikeDeserializer(DeserializationConfig config, DeserializerProvider p, MapLikeType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public abstract JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, DeserializerProvider p, JavaType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public KeyDeserializer createKeyDeserializer(DeserializationConfig config, JavaType type, BeanProperty property) throws JsonMappingException
JsonMappingException
public TypeDeserializer findTypeDeserializer(DeserializationConfig config, JavaType baseType, BeanProperty property)
Note that this method is usually only directly called for values of container (Collection, array, Map) types and root values, but not for bean property values.
baseType
- Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)
@Deprecated public final TypeDeserializer findTypeDeserializer(DeserializationConfig config, JavaType baseType)
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
@Deprecated public final JsonDeserializer<Object> createBeanDeserializer(DeserializationConfig config, JavaType type, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
@Deprecated public final JsonDeserializer<?> createArrayDeserializer(DeserializationConfig config, ArrayType type, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
@Deprecated public final JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig config, CollectionType type, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
@Deprecated public final JsonDeserializer<?> createEnumDeserializer(DeserializationConfig config, Class<?> enumClass, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
@Deprecated public final JsonDeserializer<?> createMapDeserializer(DeserializationConfig config, MapType type, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
@Deprecated public final JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, Class<? extends JsonNode> nodeClass, DeserializerProvider p) throws JsonMappingException
Note: declared final to prevent sub-classes from overriding; choice is between hard compile-time error and nastier runtime errors as this method should not be called by core framework any more.
JsonMappingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |