POJOPropertiesCollector
Date: 2016-12-04

com.fasterxml.jackson.databind.introspect

## Class POJOPropertiesCollector

- java.lang.Object
- - com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector

-     public class POJOPropertiesCollector
      extends java.lang.Object

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AnnotationIntrospector` | `_annotationIntrospector`
    `protected java.util.LinkedList<AnnotatedMember>` | `_anyGetters`
    `protected java.util.LinkedList<AnnotatedMember>` | `_anySetterField`
    `protected java.util.LinkedList<AnnotatedMethod>` | `_anySetters`
    `protected AnnotatedClass` | `_classDef` Low-level introspected class information (methods, fields etc)
    `protected boolean` | `_collected` State flag we keep to indicate whether actual property information has been collected or not.
    `protected MapperConfig<?>` | `_config` Configuration settings
    `protected java.util.LinkedList<POJOPropertyBuilder>` | `_creatorProperties`
    `protected boolean` | `_forSerialization` True if introspection is done for serialization (giving precedence for serialization annotations), or not (false, deserialization)
    `protected java.util.HashSet<java.lang.String>` | `_ignoredPropertyNames` Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes
    `protected java.util.LinkedHashMap<java.lang.Object,AnnotatedMember>` | `_injectables` Lazily collected list of members that were annotated to indicate that they represent mutators for deserializer value injection.
    `protected java.util.LinkedList<AnnotatedMethod>` | `_jsonValueGetters` Method(s) marked with 'JsonValue' annotation
    `protected java.lang.String` | `_mutatorPrefix` Prefix used by auto-detected mutators ("setters"): usually "set", but differs for builder objects ("with" by default).
    `protected java.util.LinkedHashMap<java.lang.String,POJOPropertyBuilder>` | `_properties` Set of logical property information collected so far.
    `protected boolean` | `_stdBeanNaming`
    `protected JavaType` | `_type` Type of POJO for which properties are being collected.
    `protected VisibilityChecker<?>` | `_visibilityChecker`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `POJOPropertiesCollector(MapperConfig<?> config, boolean forSerialization, JavaType type, AnnotatedClass classDef, java.lang.String mutatorPrefix)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `_addCreatorParam(java.util.Map<java.lang.String,POJOPropertyBuilder> props, AnnotatedParameter param)`
    `protected void` | `_addCreators(java.util.Map<java.lang.String,POJOPropertyBuilder> props)` Method for collecting basic information on constructor(s) found
    `protected void` | `_addFields(java.util.Map<java.lang.String,POJOPropertyBuilder> props)` Method for collecting basic information on all fields found
    `protected void` | `_addGetterMethod(java.util.Map<java.lang.String,POJOPropertyBuilder> props, AnnotatedMethod m, AnnotationIntrospector ai)`
    `protected void` | `_addInjectables(java.util.Map<java.lang.String,POJOPropertyBuilder> props)`
    `protected void` | `_addMethods(java.util.Map<java.lang.String,POJOPropertyBuilder> props)` Method for collecting basic information on all fields found
    `protected void` | `_addSetterMethod(java.util.Map<java.lang.String,POJOPropertyBuilder> props, AnnotatedMethod m, AnnotationIntrospector ai)`
    `protected void` | `_doAddInjectable(java.lang.Object id, AnnotatedMember m)`
    `protected POJOPropertyBuilder` | `_property(java.util.Map<java.lang.String,POJOPropertyBuilder> props, PropertyName name)`
    `protected POJOPropertyBuilder` | `_property(java.util.Map<java.lang.String,POJOPropertyBuilder> props, java.lang.String implName)`
    `protected void` | `_removeUnwantedAccessor(java.util.Map<java.lang.String,POJOPropertyBuilder> props)` Method called to further get rid of unwanted individual accessors, based on read/write settings and rules for "pulling in" accessors (or not).
    `protected void` | `_removeUnwantedProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)` Method called to get rid of candidate properties that are marked as ignored.
    `protected void` | `_renameProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)`
    `protected void` | `_renameUsing(java.util.Map<java.lang.String,POJOPropertyBuilder> propMap, PropertyNamingStrategy naming)`
    `protected void` | `_renameWithWrappers(java.util.Map<java.lang.String,POJOPropertyBuilder> props)`
    `protected void` | `_sortProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)`
    `protected void` | `_updateCreatorProperty(POJOPropertyBuilder prop, java.util.List<POJOPropertyBuilder> creatorProperties)`
    `POJOPropertiesCollector` | `collect()` Deprecated. Since 2.6; no need to call
    `protected void` | `collectAll()` Internal method that will collect actual property information.
    `java.lang.Class<?>` | `findPOJOBuilderClass()` Method for finding Class to use as POJO builder, if any.
    `AnnotationIntrospector` | `getAnnotationIntrospector()`
    `AnnotatedMember` | `getAnyGetter()`
    `AnnotatedMember` | `getAnySetterField()`
    `AnnotatedMethod` | `getAnySetterMethod()`
    `AnnotatedClass` | `getClassDef()`
    `MapperConfig<?>` | `getConfig()`
    `java.util.Set<java.lang.String>` | `getIgnoredPropertyNames()` Accessor for set of properties that are explicitly marked to be ignored via per-property markers (but NOT class annotations).
    `java.util.Map<java.lang.Object,AnnotatedMember>` | `getInjectables()`
    `AnnotatedMethod` | `getJsonValueMethod()`
    `ObjectIdInfo` | `getObjectIdInfo()` Accessor to find out whether type specified requires inclusion of Object Identifier.
    `java.util.List<BeanPropertyDefinition>` | `getProperties()`
    `protected java.util.Map<java.lang.String,POJOPropertyBuilder>` | `getPropertyMap()`
    `JavaType` | `getType()`
    `protected void` | `reportProblem(java.lang.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)

    - #### _stdBeanNaming

          protected final boolean _stdBeanNaming

      Since:
        2.5

    - #### _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 java.lang.String _mutatorPrefix

      Prefix used by auto-detected mutators ("setters"): usually "set", but differs for builder objects ("with" by default).

    - #### _collected

          protected boolean _collected

      State flag we keep to indicate whether actual property information has been collected or not.

    - #### _properties

          protected java.util.LinkedHashMap<java.lang.String,POJOPropertyBuilder> _properties

      Set of logical property information collected so far.

      Since 2.6, this has been constructed (more) lazily, to defer throwing of exceptions for potential conflicts in cases where this may not be an actual problem.

    - #### _creatorProperties

          protected java.util.LinkedList<POJOPropertyBuilder> _creatorProperties

    - #### _anyGetters

          protected java.util.LinkedList<AnnotatedMember> _anyGetters

    - #### _anySetters

          protected java.util.LinkedList<AnnotatedMethod> _anySetters

    - #### _anySetterField

          protected java.util.LinkedList<AnnotatedMember> _anySetterField

    - #### _jsonValueGetters

          protected java.util.LinkedList<AnnotatedMethod> _jsonValueGetters

      Method(s) marked with 'JsonValue' annotation

    - #### _ignoredPropertyNames

          protected java.util.HashSet<java.lang.String> _ignoredPropertyNames

      Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes

    - #### _injectables

          protected java.util.LinkedHashMap<java.lang.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,
                                 java.lang.String mutatorPrefix)

  - ### Method Detail

    - #### getConfig

          public MapperConfig<?> getConfig()

    - #### getType

          public JavaType getType()

    - #### getClassDef

          public AnnotatedClass getClassDef()

    - #### getAnnotationIntrospector

          public AnnotationIntrospector getAnnotationIntrospector()

    - #### getProperties

          public java.util.List<BeanPropertyDefinition> getProperties()

    - #### getInjectables

          public java.util.Map<java.lang.Object,AnnotatedMember> getInjectables()

    - #### getJsonValueMethod

          public AnnotatedMethod getJsonValueMethod()

    - #### getAnyGetter

          public AnnotatedMember getAnyGetter()

    - #### getAnySetterField

          public AnnotatedMember getAnySetterField()

    - #### getAnySetterMethod

          public AnnotatedMethod getAnySetterMethod()

    - #### getIgnoredPropertyNames

          public java.util.Set<java.lang.String> getIgnoredPropertyNames()

      Accessor for set of properties that are explicitly marked to be ignored via per-property markers (but NOT class annotations).

    - #### getObjectIdInfo

          public ObjectIdInfo getObjectIdInfo()

      Accessor to find out whether type specified requires inclusion of Object Identifier.

    - #### findPOJOBuilderClass

          public java.lang.Class<?> findPOJOBuilderClass()

      Method for finding Class to use as POJO builder, if any.

    - #### getPropertyMap

          protected java.util.Map<java.lang.String,POJOPropertyBuilder> getPropertyMap()

    - #### collect

          @Deprecated
          public POJOPropertiesCollector collect()

      Deprecated. Since 2.6; no need to call
      Method that orchestrates collection activities, and needs to be called after creating the instance.

      Since 2.6 has become a no-op and actual collection is done more lazily at point where properties are actually needed.

    - #### collectAll

          protected void collectAll()

      Internal method that will collect actual property information.
      Since:
        2.6

    - #### _addFields

          protected void _addFields(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

      Method for collecting basic information on all fields found

    - #### _addCreators

          protected void _addCreators(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

      Method for collecting basic information on constructor(s) found

    - #### _addCreatorParam

          protected void _addCreatorParam(java.util.Map<java.lang.String,POJOPropertyBuilder> props,
                              AnnotatedParameter param)

      Since:
        2.4

    - #### _addMethods

          protected void _addMethods(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

      Method for collecting basic information on all fields found

    - #### _addGetterMethod

          protected void _addGetterMethod(java.util.Map<java.lang.String,POJOPropertyBuilder> props,
                              AnnotatedMethod m,
                              AnnotationIntrospector ai)

    - #### _addSetterMethod

          protected void _addSetterMethod(java.util.Map<java.lang.String,POJOPropertyBuilder> props,
                              AnnotatedMethod m,
                              AnnotationIntrospector ai)

    - #### _addInjectables

          protected void _addInjectables(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

    - #### _doAddInjectable

          protected void _doAddInjectable(java.lang.Object id,
                              AnnotatedMember m)

    - #### _removeUnwantedProperties

          protected void _removeUnwantedProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

      Method called to get rid of candidate properties that are marked as ignored.

    - #### _removeUnwantedAccessor

          protected void _removeUnwantedAccessor(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

      Method called to further get rid of unwanted individual accessors, based on read/write settings and rules for "pulling in" accessors (or not).

    - #### _renameProperties

          protected void _renameProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

    - #### _renameUsing

          protected void _renameUsing(java.util.Map<java.lang.String,POJOPropertyBuilder> propMap,
                          PropertyNamingStrategy naming)

    - #### _renameWithWrappers

          protected void _renameWithWrappers(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

    - #### _sortProperties

          protected void _sortProperties(java.util.Map<java.lang.String,POJOPropertyBuilder> props)

    - #### reportProblem

          protected void reportProblem(java.lang.String msg)

    - #### _property

          protected POJOPropertyBuilder _property(java.util.Map<java.lang.String,POJOPropertyBuilder> props,
                                      PropertyName name)

    - #### _property

          protected POJOPropertyBuilder _property(java.util.Map<java.lang.String,POJOPropertyBuilder> props,
                                      java.lang.String implName)

    - #### _updateCreatorProperty

          protected void _updateCreatorProperty(POJOPropertyBuilder prop,
                                    java.util.List<POJOPropertyBuilder> creatorProperties)