程序包 | 说明 |
---|---|
org.codehaus.jackson.map |
Contains basic mapper (conversion) functionality that
allows for converting between regular streaming json content and
Java objects (beans or Tree Model: support for both is via
ObjectMapper class, as well
as convenience methods included in
JsonParser
Object mapper will convert Json content to ant from
basic Java wrapper types (Integer, Boolean, Double),
Collection types (List, Map), Java Beans,
Strings and nulls. |
org.codehaus.jackson.map.deser |
Contains implementation classes of deserialization part of
data binding.
|
org.codehaus.jackson.map.deser.impl |
Contains those implementation classes of deserialization part of
data binding that are not considered part of public or semi-public
interfaces.
|
org.codehaus.jackson.map.introspect |
Functionality needed for Bean introspection, required for detecting
accessors and mutators for Beans, as well as locating and handling
method annotations.
|
org.codehaus.jackson.map.ser |
Contains implementation classes of serialization part of
data binding.
|
org.codehaus.jackson.map.ser.std |
限定符和类型 | 方法和说明 |
---|---|
abstract ValueInstantiator |
DeserializerFactory.findValueInstantiator(DeserializationConfig config,
BasicBeanDescription beanDesc)
Method that is to find all creators (constructors, factory methods)
for the bean type to deserialize.
|
限定符和类型 | 字段和说明 |
---|---|
protected BasicBeanDescription |
BeanDeserializerBuilder._beanDesc |
限定符和类型 | 方法和说明 |
---|---|
protected void |
BeanDeserializerFactory._addDeserializerConstructors(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
AnnotationIntrospector intr,
CreatorCollector creators) |
protected void |
BeanDeserializerFactory._addDeserializerFactoryMethods(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
AnnotationIntrospector intr,
CreatorCollector creators) |
protected JsonDeserializer<Object> |
BeanDeserializerFactory._findCustomBeanDeserializer(JavaType type,
DeserializationConfig config,
DeserializerProvider provider,
BasicBeanDescription beanDesc,
BeanProperty property) |
protected JsonDeserializer<?> |
BeanDeserializerFactory._findCustomCollectionDeserializer(CollectionType type,
DeserializationConfig config,
DeserializerProvider provider,
BasicBeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer) |
protected abstract JsonDeserializer<?> |
BasicDeserializerFactory._findCustomCollectionDeserializer(CollectionType type,
DeserializationConfig config,
DeserializerProvider p,
BasicBeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeser,
JsonDeserializer<?> elementDeser) |
protected JsonDeserializer<?> |
BeanDeserializerFactory._findCustomCollectionLikeDeserializer(CollectionLikeType type,
DeserializationConfig config,
DeserializerProvider provider,
BasicBeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer) |
protected abstract JsonDeserializer<?> |
BasicDeserializerFactory._findCustomCollectionLikeDeserializer(CollectionLikeType type,
DeserializationConfig config,
DeserializerProvider p,
BasicBeanDescription beanDesc,
BeanProperty property,
TypeDeserializer elementTypeDeser,
JsonDeserializer<?> elementDeser) |
protected JsonDeserializer<?> |
BeanDeserializerFactory._findCustomEnumDeserializer(Class<?> type,
DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property) |
protected abstract JsonDeserializer<?> |
BasicDeserializerFactory._findCustomEnumDeserializer(Class<?> type,
DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property) |
protected JsonDeserializer<?> |
BeanDeserializerFactory._findCustomMapDeserializer(MapType type,
DeserializationConfig config,
DeserializerProvider provider,
BasicBeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeserializer,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer) |
protected abstract JsonDeserializer<?> |
BasicDeserializerFactory._findCustomMapDeserializer(MapType type,
DeserializationConfig config,
DeserializerProvider p,
BasicBeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeser,
TypeDeserializer elementTypeDeser,
JsonDeserializer<?> elementDeser) |
protected JsonDeserializer<?> |
BeanDeserializerFactory._findCustomMapLikeDeserializer(MapLikeType type,
DeserializationConfig config,
DeserializerProvider provider,
BasicBeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeserializer,
TypeDeserializer elementTypeDeserializer,
JsonDeserializer<?> elementDeserializer) |
protected abstract JsonDeserializer<?> |
BasicDeserializerFactory._findCustomMapLikeDeserializer(MapLikeType type,
DeserializationConfig config,
DeserializerProvider p,
BasicBeanDescription beanDesc,
BeanProperty property,
KeyDeserializer keyDeser,
TypeDeserializer elementTypeDeser,
JsonDeserializer<?> elementDeser) |
protected boolean |
BeanDeserializerFactory._handleSingleArgumentConstructor(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
AnnotationIntrospector intr,
CreatorCollector creators,
AnnotatedConstructor ctor,
boolean isCreator,
boolean isVisible) |
protected boolean |
BeanDeserializerFactory._handleSingleArgumentFactory(DeserializationConfig config,
BasicBeanDescription beanDesc,
VisibilityChecker<?> vchecker,
AnnotationIntrospector intr,
CreatorCollector creators,
AnnotatedMethod factory,
boolean isCreator) |
protected void |
BeanDeserializerFactory.addBeanProps(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method called to figure out settable properties for the
bean deserializer to use.
|
protected void |
BeanDeserializerFactory.addInjectables(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method called locate all members used for value injection (if any),
constructor
ValueInjector instances, and add them to builder. |
protected void |
BeanDeserializerFactory.addReferenceProperties(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method that will find if bean has any managed- or back-reference properties,
and if so add them to bean, to be linked during resolution phase.
|
JsonDeserializer<Object> |
BeanDeserializerFactory.buildBeanDeserializer(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property)
Method that is to actually build a bean deserializer instance.
|
JsonDeserializer<Object> |
BeanDeserializerFactory.buildThrowableDeserializer(DeserializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property) |
protected SettableAnyProperty |
BeanDeserializerFactory.constructAnySetter(DeserializationConfig config,
BasicBeanDescription beanDesc,
AnnotatedMethod setter)
Method called to construct fallback
SettableAnyProperty
for handling unknown bean properties, given a method that
has been designated as such setter. |
protected BeanDeserializerBuilder |
BeanDeserializerFactory.constructBeanDeserializerBuilder(BasicBeanDescription beanDesc)
Overridable method that constructs a
BeanDeserializerBuilder
which is used to accumulate information needed to create deserializer
instance. |
protected CreatorProperty |
BeanDeserializerFactory.constructCreatorProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
int index,
AnnotatedParameter param,
Object injectableValueId)
Method that will construct a property object that represents
a logical property passed via Creator (constructor or static
factory method)
|
protected ValueInstantiator |
BeanDeserializerFactory.constructDefaultValueInstantiator(DeserializationConfig config,
BasicBeanDescription beanDesc)
Method that will construct standard default
ValueInstantiator
using annotations (like @JsonCreator) and visibility rules |
protected SettableBeanProperty |
BeanDeserializerFactory.constructSettableProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedField field) |
protected SettableBeanProperty |
BeanDeserializerFactory.constructSettableProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedMethod setter)
Method that will construct a regular bean property setter using
the given setter method.
|
protected SettableBeanProperty |
BeanDeserializerFactory.constructSetterlessProperty(DeserializationConfig config,
BasicBeanDescription beanDesc,
String name,
AnnotatedMethod getter)
Method that will construct a regular bean property setter using
the given setter method.
|
ValueInstantiator |
BeanDeserializerFactory.findValueInstantiator(DeserializationConfig config,
BasicBeanDescription beanDesc)
Value instantiator is created both based on creator annotations,
and on optional externally provided instantiators (registered through
module interface).
|
abstract ValueInstantiator |
BasicDeserializerFactory.findValueInstantiator(DeserializationConfig config,
BasicBeanDescription beanDesc) |
protected boolean |
BeanDeserializerFactory.isIgnorableType(DeserializationConfig config,
BasicBeanDescription beanDesc,
Class<?> type,
Map<Class<?>,Boolean> ignoredTypes)
Helper method that will check whether given raw type is marked as always ignorable
(for purpose of ignoring properties with type)
|
protected JavaType |
BeanDeserializerFactory.materializeAbstractType(DeserializationConfig config,
BasicBeanDescription beanDesc) |
JsonDeserializer<?> |
BeanDeserializerModifier.modifyDeserializer(DeserializationConfig config,
BasicBeanDescription beanDesc,
JsonDeserializer<?> deserializer)
Method called by
BeanDeserializerFactory after constructing default
bean deserializer instance with properties collected and ordered earlier. |
protected JavaType |
BasicDeserializerFactory.resolveType(DeserializationConfig config,
BasicBeanDescription beanDesc,
JavaType type,
AnnotatedMember member,
BeanProperty property)
Helper method used to resolve method return types and field
types.
|
BeanDeserializerBuilder |
BeanDeserializerModifier.updateBuilder(DeserializationConfig config,
BasicBeanDescription beanDesc,
BeanDeserializerBuilder builder)
Method called by
BeanDeserializerFactory when it has collected
basic information such as tentative list of properties to deserialize. |
构造器和说明 |
---|
BeanDeserializerBuilder(BasicBeanDescription beanDesc) |
构造器和说明 |
---|
CreatorCollector(BasicBeanDescription beanDesc,
boolean canFixAccess) |
限定符和类型 | 字段和说明 |
---|---|
protected static BasicBeanDescription |
BasicClassIntrospector.BOOLEAN_DESC |
protected static BasicBeanDescription |
BasicClassIntrospector.INT_DESC |
protected static BasicBeanDescription |
BasicClassIntrospector.LONG_DESC |
protected static BasicBeanDescription |
BasicClassIntrospector.STRING_DESC |
限定符和类型 | 方法和说明 |
---|---|
protected BasicBeanDescription |
BasicClassIntrospector._findCachedDesc(JavaType type)
Method called to see if type is one of core JDK types
that we have cached for efficiency.
|
BasicBeanDescription |
BasicClassIntrospector.forClassAnnotations(MapperConfig<?> cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
BasicBeanDescription |
BasicClassIntrospector.forCreation(DeserializationConfig cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
BasicBeanDescription |
BasicClassIntrospector.forDeserialization(DeserializationConfig cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
static BasicBeanDescription |
BasicBeanDescription.forDeserialization(POJOPropertiesCollector coll)
Factory method to use for constructing an instance to use for building
deserializers.
|
BasicBeanDescription |
BasicClassIntrospector.forDirectClassAnnotations(MapperConfig<?> cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
static BasicBeanDescription |
BasicBeanDescription.forOtherUse(MapperConfig<?> config,
JavaType type,
AnnotatedClass ac)
Factory method to use for constructing an instance to use for purposes
other than building serializers or deserializers; will only have information
on class, not on properties.
|
static BasicBeanDescription |
BasicBeanDescription.forSerialization(POJOPropertiesCollector coll)
Factory method to use for constructing an instance to use for building
serializers.
|
BasicBeanDescription |
BasicClassIntrospector.forSerialization(SerializationConfig cfg,
JavaType type,
ClassIntrospector.MixInResolver r) |
限定符和类型 | 字段和说明 |
---|---|
protected BasicBeanDescription |
PropertyBuilder._beanDesc |
protected BasicBeanDescription |
BeanSerializerBuilder._beanDesc |
限定符和类型 | 方法和说明 |
---|---|
BasicBeanDescription |
BeanSerializerBuilder.getBeanDescription() |
限定符和类型 | 方法和说明 |
---|---|
protected JsonSerializer<?> |
BasicSerializerFactory.buildArraySerializer(SerializationConfig config,
ArrayType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Object[] (and subtypes, except for String). |
protected JsonSerializer<?> |
BasicSerializerFactory.buildCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Collection and Collection-like types.
|
protected JsonSerializer<?> |
BasicSerializerFactory.buildCollectionSerializer(SerializationConfig config,
CollectionType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
List types that support efficient by-index access
Note: signature changed in 1.8, to take 'staticTyping' argument |
JsonSerializer<?> |
BasicSerializerFactory.buildContainerSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildEnumMapSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
EnumMap types. |
protected JsonSerializer<?> |
BasicSerializerFactory.buildEnumSetSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildIterableSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildIteratorSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping) |
protected JsonSerializer<?> |
BasicSerializerFactory.buildMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
all "Map-like" types; both ones that implement
Map and
ones that do not (but that have been indicated to behave like Maps). |
protected JsonSerializer<?> |
BasicSerializerFactory.buildMapSerializer(SerializationConfig config,
MapType type,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Helper method that handles configuration details when constructing serializers for
Map types. |
List<BeanPropertyWriter> |
BeanSerializerModifier.changeProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> beanProperties)
Method called by
BeanSerializerFactory with tentative set
of discovered properties. |
protected JsonSerializer<Object> |
BeanSerializerFactory.constructBeanSerializer(SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property)
Method called to construct serializer for serializing specified bean type.
|
protected BeanSerializerBuilder |
BeanSerializerFactory.constructBeanSerializerBuilder(BasicBeanDescription beanDesc) |
protected PropertyBuilder |
BeanSerializerFactory.constructPropertyBuilder(SerializationConfig config,
BasicBeanDescription beanDesc) |
protected List<BeanPropertyWriter> |
BeanSerializerFactory.filterBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> props)
Overridable method that can filter out properties.
|
protected List<BeanPropertyWriter> |
BeanSerializerFactory.findBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc)
Method used to collect all actual serializable properties.
|
JsonSerializer<Object> |
BeanSerializerFactory.findBeanSerializer(SerializationConfig config,
JavaType type,
BasicBeanDescription beanDesc,
BeanProperty property)
Method that will try to construct a
BeanSerializer for
given class. |
protected Object |
BeanSerializerFactory.findFilterId(SerializationConfig config,
BasicBeanDescription beanDesc)
Method called to find filter that is configured to be used with bean
serializer being built, if any.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByAddonType(SerializationConfig config,
JavaType javaType,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Reflection-based serialized find method, which checks if
given class implements one of recognized "add-on" interfaces.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByLookup(JavaType type,
SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Method that will use fast lookup (and identity comparison) methods to
see if we know serializer to use for given type.
|
JsonSerializer<?> |
BasicSerializerFactory.findSerializerByPrimaryType(JavaType type,
SerializationConfig config,
BasicBeanDescription beanDesc,
BeanProperty property,
boolean staticTyping)
Method for checking if we can determine serializer to use based on set of
known primary types, checking for set of known base types (exact matches
having been compared against with
findSerializerByLookup ). |
JsonSerializer<?> |
BeanSerializerModifier.modifySerializer(SerializationConfig config,
BasicBeanDescription beanDesc,
JsonSerializer<?> serializer)
Method called by
BeanSerializerFactory after constructing default
bean serializer instance with properties collected and ordered earlier. |
List<BeanPropertyWriter> |
BeanSerializerModifier.orderProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> beanProperties)
Method called by
BeanSerializerFactory with set of properties
to serialize, in default ordering (based on defaults as well as
possible type annotations). |
protected void |
BeanSerializerFactory.removeIgnorableTypes(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyDefinition> properties)
Method that will apply by-type limitations (as per [JACKSON-429]);
by default this is based on
JsonIgnoreType annotation but
can be supplied by module-provided introspectors too. |
protected void |
BeanSerializerFactory.removeSetterlessGetters(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyDefinition> properties)
Helper method that will remove all properties that do not have a
mutator.
|
protected List<BeanPropertyWriter> |
BeanSerializerFactory.sortBeanProperties(SerializationConfig config,
BasicBeanDescription beanDesc,
List<BeanPropertyWriter> props)
已过时。
Since 1.9 this method does nothing, so there is no
benefit from overriding it; it will be removed from 2.0.
|
BeanSerializerBuilder |
BeanSerializerModifier.updateBuilder(SerializationConfig config,
BasicBeanDescription beanDesc,
BeanSerializerBuilder builder)
Method called by
BeanSerializerFactory after collecting all information
regarding POJO to serialize and updating builder with it, but before constructing
serializer. |
protected boolean |
BasicSerializerFactory.usesStaticTyping(SerializationConfig config,
BasicBeanDescription beanDesc,
TypeSerializer typeSer,
BeanProperty property)
Helper method to check whether global settings and/or class
annotations for the bean class indicate that static typing
(declared types) should be used for properties.
|
构造器和说明 |
---|
BeanSerializerBuilder(BasicBeanDescription beanDesc) |
PropertyBuilder(SerializationConfig config,
BasicBeanDescription beanDesc) |
限定符和类型 | 方法和说明 |
---|---|
static EnumSerializer |
EnumSerializer.construct(Class<Enum<?>> enumClass,
SerializationConfig config,
BasicBeanDescription beanDesc) |