com.fasterxml.jackson.databind.introspect
Class POJOPropertiesCollector

java.lang.Object
  extended by com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector

public class POJOPropertiesCollector
extends Object

Helper class used for aggregating information about all possible properties of a POJO.


Field Summary
protected  AnnotationIntrospector _annotationIntrospector
           
protected  LinkedList<AnnotatedMember> _anyGetters
           
protected  LinkedList<AnnotatedMethod> _anySetters
           
protected  AnnotatedClass _classDef
          Low-level introspected class information (methods, fields etc)
protected  MapperConfig<?> _config
          Configuration settings
protected  LinkedList<POJOPropertyBuilder> _creatorProperties
           
protected  boolean _forSerialization
          True if introspection is done for serialization (giving precedence for serialization annotations), or not (false, deserialization)
protected  HashSet<String> _ignoredPropertyNames
          Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes
protected  LinkedHashMap<Object,AnnotatedMember> _injectables
          Lazily collected list of members that were annotated to indicate that they represent mutators for deserializer value injection.
protected  LinkedList<AnnotatedMethod> _jsonValueGetters
          Method(s) marked with 'JsonValue' annotation
protected  String _mutatorPrefix
           
protected  LinkedHashMap<String,POJOPropertyBuilder> _properties
          Set of logical property information collected so far
protected  JavaType _type
          Type of POJO for which properties are being collected.
protected  VisibilityChecker<?> _visibilityChecker
           
 
Constructor Summary
protected POJOPropertiesCollector(MapperConfig<?> config, boolean forSerialization, JavaType type, AnnotatedClass classDef, String mutatorPrefix)
           
 
Method Summary
protected  void _addCreators()
          Method for collecting basic information on constructor(s) found
protected  void _addFields()
          Method for collecting basic information on all fields found
protected  void _addGetterMethod(AnnotatedMethod m, AnnotationIntrospector ai)
           
protected  void _addInjectables()
           
protected  void _addMethods()
          Method for collecting basic information on all fields found
protected  void _addSetterMethod(AnnotatedMethod m, AnnotationIntrospector ai)
           
protected  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()
           
 POJOPropertiesCollector collect()
          Method that orchestrates collection activities, and needs to be called after creating the instance.
 Class<?> findPOJOBuilderClass()
          Method for finding Class to use as POJO builder, if any.
 AnnotationIntrospector getAnnotationIntrospector()
           
 AnnotatedMember getAnyGetter()
           
 AnnotatedMethod getAnySetterMethod()
           
 AnnotatedClass getClassDef()
           
 MapperConfig<?> getConfig()
           
 Set<String> getIgnoredPropertyNames()
           
 Map<Object,AnnotatedMember> getInjectables()
           
 AnnotatedMethod getJsonValueMethod()
           
 ObjectIdInfo getObjectIdInfo()
          Accessor to find out whether type specified requires inclusion of Object Identifier.
 List<BeanPropertyDefinition> getProperties()
           
protected  Map<String,POJOPropertyBuilder> getPropertyMap()
           
 JavaType getType()
           
protected  void reportProblem(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

_mutatorPrefix

protected final String _mutatorPrefix

_properties

protected final LinkedHashMap<String,POJOPropertyBuilder> _properties
Set of logical property information collected so far


_creatorProperties

protected LinkedList<POJOPropertyBuilder> _creatorProperties

_anyGetters

protected LinkedList<AnnotatedMember> _anyGetters

_anySetters

protected LinkedList<AnnotatedMethod> _anySetters

_jsonValueGetters

protected LinkedList<AnnotatedMethod> _jsonValueGetters
Method(s) marked with 'JsonValue' annotation


_ignoredPropertyNames

protected HashSet<String> _ignoredPropertyNames
Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes


_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,
                                  String mutatorPrefix)
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()

getAnyGetter

public AnnotatedMember getAnyGetter()

getAnySetterMethod

public AnnotatedMethod getAnySetterMethod()

getIgnoredPropertyNames

public Set<String> getIgnoredPropertyNames()

getObjectIdInfo

public ObjectIdInfo getObjectIdInfo()
Accessor to find out whether type specified requires inclusion of Object Identifier.


findPOJOBuilderClass

public Class<?> findPOJOBuilderClass()
Method for finding Class to use as POJO builder, if any.


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


_addGetterMethod

protected void _addGetterMethod(AnnotatedMethod m,
                                AnnotationIntrospector ai)

_addSetterMethod

protected void _addSetterMethod(AnnotatedMethod m,
                                AnnotationIntrospector ai)

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


Copyright © 2012 fasterxml.com. All Rights Reserved.