Class POJOPropertiesCollector


  • public class POJOPropertiesCollector
    extends java.lang.Object
    Helper class used for aggregating information about all possible properties of a POJO.
    Since:
    1.9
    • 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)
      • _properties

        protected final java.util.LinkedHashMap<java.lang.String,​POJOPropertyBuilder> _properties
        Set of logical property information collected so far
      • _jsonValueGetters

        protected java.util.LinkedList<AnnotatedMethod> _jsonValueGetters
        Method(s) marked with 'JsonValue' annotation
      • _ignoredPropertyNames

        protected java.util.Set<java.lang.String> _ignoredPropertyNames
        Lazily collected list of properties that can be implicitly ignored during serialization; only updated when collecting information for deserialization purposes
      • _ignoredPropertyNamesForDeser

        protected java.util.Set<java.lang.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 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.
    • Method Detail

      • getInjectables

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

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

        public java.util.Set<java.lang.String> getIgnoredPropertyNamesForDeser()
        Since:
        1.9.4
      • getPropertyMap

        protected java.util.Map<java.lang.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​(java.lang.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()
      • reportProblem

        protected void reportProblem​(java.lang.String msg)