|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.DeserializerFactory
org.codehaus.jackson.map.deser.BasicDeserializerFactory
public abstract class BasicDeserializerFactory
Abstract factory base class that can provide deserializers for standard
JDK classes, including collection classes and simple heuristics for
"upcasting" commmon collection interface types
(such as Collection
).
Since all simple deserializers are eagerly instantiated, and there is no additional introspection or customizability of these types, this factory is stateless.
Constructor Summary | |
---|---|
protected |
BasicDeserializerFactory()
|
Method Summary | ||
---|---|---|
protected SettableBeanProperty |
constructCreatorProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
int index,
AnnotatedParameter param)
Method that will construct a property object that represents a logical property passed via Creator (constructor or static factory method) |
|
JsonDeserializer<?> |
createArrayDeserializer(DeserializationConfig config,
ArrayType type,
DeserializerProvider p)
Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert Json content into values of specified Java type. |
|
JsonDeserializer<Object> |
createBeanDeserializer(DeserializationConfig config,
JavaType type,
DeserializerProvider p)
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<?> |
createCollectionDeserializer(DeserializationConfig config,
CollectionType type,
DeserializerProvider p)
|
|
JsonDeserializer<?> |
createEnumDeserializer(DeserializationConfig config,
Class<?> enumClass,
DeserializerProvider p)
Factory method for constructing serializers of Enum types. |
|
JsonDeserializer<?> |
createMapDeserializer(DeserializationConfig config,
MapType type,
DeserializerProvider p)
|
|
JsonDeserializer<?> |
createTreeDeserializer(DeserializationConfig config,
Class<? extends JsonNode> nodeClass,
DeserializerProvider p)
Method called to create and return a deserializer that can construct JsonNode(s) from Json content. |
|
protected JsonDeserializer<Object> |
findDeserializerFromAnnotation(DeserializationConfig config,
Annotated a)
Helper method called to check if a class or method has annotation that tells which class to use for deserialization. |
|
TypeDeserializer |
findPropertyContentTypeDeserializer(DeserializationConfig config,
JavaType containerType,
AnnotatedMember propertyEntity)
Method called to find and create a type information deserializer for values of given container (list, array, map) property, if one is needed. |
|
TypeDeserializer |
findPropertyTypeDeserializer(DeserializationConfig config,
JavaType baseType,
AnnotatedMember propertyEntity)
Method called to create a type information deserializer for values of given non-container property, if one is needed. |
|
TypeDeserializer |
findTypeDeserializer(DeserializationConfig config,
JavaType baseType)
Method called to find and create a type information deserializer for given base type, if one is needed. |
|
protected
|
modifyTypeByAnnotation(DeserializationConfig config,
Annotated a,
T type,
String propName)
Method called to see if given method has annotations that indicate a more specific type than what the argument specifies. |
|
protected JavaType |
resolveType(DeserializationConfig config,
BasicBeanDescription beanDesc,
Type rawType,
Annotated a)
Helper method used to resolve method return types and field types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BasicDeserializerFactory()
Method Detail |
---|
public JsonDeserializer<?> createArrayDeserializer(DeserializationConfig config, ArrayType type, DeserializerProvider p) throws JsonMappingException
DeserializerFactory
createArrayDeserializer
in class DeserializerFactory
type
- Type to be deserializedp
- Provider that can be called to create deserializers for
contained member types
JsonMappingException
public JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig config, CollectionType type, DeserializerProvider p) throws JsonMappingException
createCollectionDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createMapDeserializer(DeserializationConfig config, MapType type, DeserializerProvider p) throws JsonMappingException
createMapDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createEnumDeserializer(DeserializationConfig config, Class<?> enumClass, DeserializerProvider p) throws JsonMappingException
Enum
types.
createEnumDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, Class<? extends JsonNode> nodeClass, DeserializerProvider p) throws JsonMappingException
DeserializerFactory
createTreeDeserializer
in class DeserializerFactory
JsonMappingException
public JsonDeserializer<Object> createBeanDeserializer(DeserializationConfig config, JavaType type, DeserializerProvider p) throws JsonMappingException
DeserializerFactory
createBeanDeserializer
in class DeserializerFactory
type
- Type to be deserializedp
- Provider that can be called to create deserializers for
contained member types
JsonMappingException
public TypeDeserializer findTypeDeserializer(DeserializationConfig config, JavaType baseType)
DeserializerFactory
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.
findTypeDeserializer
in class DeserializerFactory
baseType
- Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)
public TypeDeserializer findPropertyTypeDeserializer(DeserializationConfig config, JavaType baseType, AnnotatedMember propertyEntity)
Note that this method is only called for non-container bean properties, and not for values in container types or root values (or container properties)
baseType
- Declared base type of the value to deserializer (actual
deserializer type will be this type or its subtype)
public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfig config, JavaType containerType, AnnotatedMember propertyEntity)
Note that this method is only called for container bean properties, and not for values in container types or root values (or non-container properties)
containerType
- Type of property; must be a container typepropertyEntity
- Field or method that contains container propertyprotected JsonDeserializer<Object> findDeserializerFromAnnotation(DeserializationConfig config, Annotated a)
protected <T extends JavaType> T modifyTypeByAnnotation(DeserializationConfig config, Annotated a, T type, String propName) throws JsonMappingException
a
- Method or field that the type is associated withtype
- Type derived from the setter argumentpropName
- Name of property that refers to type, if any; null
if no property information available (when modify type declaration
of a class, for example)
JsonMappingException
- if invalid annotation is foundprotected JavaType resolveType(DeserializationConfig config, BasicBeanDescription beanDesc, Type rawType, Annotated a)
Starting with version 1.3, this method will also resolve instances of key and content deserializers if defined by annotations.
protected SettableBeanProperty constructCreatorProperty(DeserializationConfig config, BasicBeanDescription beanDesc, String name, int index, AnnotatedParameter param) throws JsonMappingException
JsonMappingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |