Class POJOPropertiesCollector
- java.lang.Object
-
- org.codehaus.jackson.map.introspect.POJOPropertiesCollector
-
public class POJOPropertiesCollector extends Object
Helper class used for aggregating information about all possible properties of a POJO.- Since:
- 1.9
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotationIntrospector_annotationIntrospectorprotected LinkedList<AnnotatedMethod>_anyGettersprotected LinkedList<AnnotatedMethod>_anySettersprotected AnnotatedClass_classDefLow-level introspected class information (methods, fields etc)protected MapperConfig<?>_configConfiguration settingsprotected LinkedList<POJOPropertyBuilder>_creatorPropertiesprotected boolean_forSerializationTrue if introspection is done for serialization (giving precedence for serialization annotations), or not (false, deserialization)protected Set<String>_ignoredPropertyNamesLazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposesprotected Set<String>_ignoredPropertyNamesForDeserAlternate set of property names that have been marked for explicit ignoral for deserialization: needed to deal with 1.x definition of ignorable with respect to "any setter" (see [JACKSON-313], [JACKSON-383])protected LinkedHashMap<Object,AnnotatedMember>_injectablesLazily collected list of members that were annotated to indicate that they represent mutators for deserializer value injection.protected LinkedList<AnnotatedMethod>_jsonValueGettersMethod(s) marked with 'JsonValue' annotationprotected LinkedHashMap<String,POJOPropertyBuilder>_propertiesSet of logical property information collected so farprotected JavaType_typeType of POJO for which properties are being collected.protected VisibilityChecker<?>_visibilityChecker
-
Constructor Summary
Constructors Modifier Constructor Description protectedPOJOPropertiesCollector(MapperConfig<?> config, boolean forSerialization, JavaType type, AnnotatedClass classDef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_addCreators()Method for collecting basic information on constructor(s) foundprotected void_addFields()Method for collecting basic information on all fields foundprotected void_addInjectables()protected void_addMethods()Method for collecting basic information on all fields foundprotected void_doAddInjectable(Object id, AnnotatedMember m)protected POJOPropertyBuilder_property(String implName)protected void_removeUnwantedProperties()Method called to get rid of candidate properties that are marked as ignored, or that are not visible.protected void_renameProperties()protected void_renameUsing(PropertyNamingStrategy naming)protected void_sortProperties()POJOPropertiesCollectorcollect()Method that orchestrates collection activities, and needs to be called after creating the instance.AnnotationIntrospectorgetAnnotationIntrospector()AnnotatedMethodgetAnyGetterMethod()AnnotatedMethodgetAnySetterMethod()AnnotatedClassgetClassDef()MapperConfig<?>getConfig()Set<String>getIgnoredPropertyNames()Set<String>getIgnoredPropertyNamesForDeser()Map<Object,AnnotatedMember>getInjectables()AnnotatedMethodgetJsonValueMethod()List<BeanPropertyDefinition>getProperties()protected Map<String,POJOPropertyBuilder>getPropertyMap()JavaTypegetType()protected voidreportProblem(String msg)
-
-
-
Field Detail
-
_config
protected final MapperConfig<?> _config
Configuration settings
-
_forSerialization
protected final boolean _forSerialization
True if introspection is done for serialization (giving precedence for serialization annotations), or not (false, deserialization)
-
_type
protected final JavaType _type
Type of POJO for which properties are being collected.
-
_classDef
protected final AnnotatedClass _classDef
Low-level introspected class information (methods, fields etc)
-
_visibilityChecker
protected final VisibilityChecker<?> _visibilityChecker
-
_annotationIntrospector
protected final AnnotationIntrospector _annotationIntrospector
-
_properties
protected final LinkedHashMap<String,POJOPropertyBuilder> _properties
Set of logical property information collected so far
-
_creatorProperties
protected LinkedList<POJOPropertyBuilder> _creatorProperties
-
_anyGetters
protected LinkedList<AnnotatedMethod> _anyGetters
-
_anySetters
protected LinkedList<AnnotatedMethod> _anySetters
-
_jsonValueGetters
protected LinkedList<AnnotatedMethod> _jsonValueGetters
Method(s) marked with 'JsonValue' annotation
-
_ignoredPropertyNames
protected Set<String> _ignoredPropertyNames
Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes
-
_ignoredPropertyNamesForDeser
protected Set<String> _ignoredPropertyNamesForDeser
Alternate set of property names that have been marked for explicit ignoral for deserialization: needed to deal with 1.x definition of ignorable with respect to "any setter" (see [JACKSON-313], [JACKSON-383])- Since:
- 1.9.4
-
_injectables
protected LinkedHashMap<Object,AnnotatedMember> _injectables
Lazily collected list of members that were annotated to indicate that they represent mutators for deserializer value injection.
-
-
Constructor Detail
-
POJOPropertiesCollector
protected POJOPropertiesCollector(MapperConfig<?> config, boolean forSerialization, JavaType type, AnnotatedClass classDef)
-
-
Method Detail
-
getConfig
public MapperConfig<?> getConfig()
-
getType
public JavaType getType()
-
getClassDef
public AnnotatedClass getClassDef()
-
getAnnotationIntrospector
public AnnotationIntrospector getAnnotationIntrospector()
-
getProperties
public List<BeanPropertyDefinition> getProperties()
-
getInjectables
public Map<Object,AnnotatedMember> getInjectables()
-
getJsonValueMethod
public AnnotatedMethod getJsonValueMethod()
-
getAnyGetterMethod
public AnnotatedMethod getAnyGetterMethod()
-
getAnySetterMethod
public AnnotatedMethod getAnySetterMethod()
-
getPropertyMap
protected Map<String,POJOPropertyBuilder> getPropertyMap()
-
collect
public POJOPropertiesCollector collect()
Method that orchestrates collection activities, and needs to be called after creating the instance.
-
_sortProperties
protected void _sortProperties()
-
_addFields
protected void _addFields()
Method for collecting basic information on all fields found
-
_addCreators
protected void _addCreators()
Method for collecting basic information on constructor(s) found
-
_addMethods
protected void _addMethods()
Method for collecting basic information on all fields found
-
_addInjectables
protected void _addInjectables()
-
_doAddInjectable
protected void _doAddInjectable(Object id, AnnotatedMember m)
-
_removeUnwantedProperties
protected void _removeUnwantedProperties()
Method called to get rid of candidate properties that are marked as ignored, or that are not visible.
-
_renameProperties
protected void _renameProperties()
-
_renameUsing
protected void _renameUsing(PropertyNamingStrategy naming)
-
reportProblem
protected void reportProblem(String msg)
-
_property
protected POJOPropertyBuilder _property(String implName)
-
-