public class POJOPropertiesCollector extends Object
Modifier and Type | Field and Description |
---|---|
protected AnnotationIntrospector |
_annotationIntrospector |
protected LinkedList<AnnotatedMember> |
_anyGetters |
protected 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 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
Prefix used by auto-detected mutators ("setters"): usually "set",
but differs for builder objects ("with" by default).
|
protected LinkedHashMap<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 |
Modifier | Constructor and Description |
---|---|
protected |
POJOPropertiesCollector(MapperConfig<?> config,
boolean forSerialization,
JavaType type,
AnnotatedClass classDef,
String mutatorPrefix) |
Modifier and Type | Method and Description |
---|---|
protected void |
_addCreatorParam(Map<String,POJOPropertyBuilder> props,
AnnotatedParameter param) |
protected void |
_addCreators(Map<String,POJOPropertyBuilder> props)
Method for collecting basic information on constructor(s) found
|
protected void |
_addFields(Map<String,POJOPropertyBuilder> props)
Method for collecting basic information on all fields found
|
protected void |
_addGetterMethod(Map<String,POJOPropertyBuilder> props,
AnnotatedMethod m,
AnnotationIntrospector ai) |
protected void |
_addInjectables(Map<String,POJOPropertyBuilder> props) |
protected void |
_addMethods(Map<String,POJOPropertyBuilder> props)
Method for collecting basic information on all fields found
|
protected void |
_addSetterMethod(Map<String,POJOPropertyBuilder> props,
AnnotatedMethod m,
AnnotationIntrospector ai) |
protected void |
_doAddInjectable(Object id,
AnnotatedMember m) |
protected POJOPropertyBuilder |
_property(Map<String,POJOPropertyBuilder> props,
PropertyName name) |
protected POJOPropertyBuilder |
_property(Map<String,POJOPropertyBuilder> props,
String implName) |
protected void |
_removeUnwantedAccessor(Map<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(Map<String,POJOPropertyBuilder> props)
Method called to get rid of candidate properties that are marked
as ignored.
|
protected void |
_renameProperties(Map<String,POJOPropertyBuilder> props) |
protected void |
_renameUsing(Map<String,POJOPropertyBuilder> propMap,
PropertyNamingStrategy naming) |
protected void |
_renameWithWrappers(Map<String,POJOPropertyBuilder> props) |
protected void |
_sortProperties(Map<String,POJOPropertyBuilder> props) |
protected void |
_updateCreatorProperty(POJOPropertyBuilder prop,
List<POJOPropertyBuilder> creatorProperties) |
POJOPropertiesCollector |
collect()
Deprecated.
Since 2.6; no need to call
|
protected void |
collectAll()
Internal method that will collect actual property information.
|
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()
Accessor for set of properties that are explicitly marked to be ignored
via per-property markers (but NOT class annotations).
|
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) |
protected final MapperConfig<?> _config
protected final boolean _forSerialization
protected final boolean _stdBeanNaming
protected final JavaType _type
protected final AnnotatedClass _classDef
protected final VisibilityChecker<?> _visibilityChecker
protected final AnnotationIntrospector _annotationIntrospector
protected final String _mutatorPrefix
protected boolean _collected
protected LinkedHashMap<String,POJOPropertyBuilder> _properties
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.
protected LinkedList<POJOPropertyBuilder> _creatorProperties
protected LinkedList<AnnotatedMember> _anyGetters
protected LinkedList<AnnotatedMethod> _anySetters
protected LinkedList<AnnotatedMethod> _jsonValueGetters
protected HashSet<String> _ignoredPropertyNames
protected LinkedHashMap<Object,AnnotatedMember> _injectables
protected POJOPropertiesCollector(MapperConfig<?> config, boolean forSerialization, JavaType type, AnnotatedClass classDef, String mutatorPrefix)
public MapperConfig<?> getConfig()
public JavaType getType()
public AnnotatedClass getClassDef()
public AnnotationIntrospector getAnnotationIntrospector()
public List<BeanPropertyDefinition> getProperties()
public Map<Object,AnnotatedMember> getInjectables()
public AnnotatedMethod getJsonValueMethod()
public AnnotatedMember getAnyGetter()
public AnnotatedMethod getAnySetterMethod()
public Set<String> getIgnoredPropertyNames()
public ObjectIdInfo getObjectIdInfo()
public Class<?> findPOJOBuilderClass()
protected Map<String,POJOPropertyBuilder> getPropertyMap()
@Deprecated public POJOPropertiesCollector collect()
Since 2.6 has become a no-op and actual collection is done more lazily at point where properties are actually needed.
protected void collectAll()
protected void _addFields(Map<String,POJOPropertyBuilder> props)
protected void _addCreators(Map<String,POJOPropertyBuilder> props)
protected void _addCreatorParam(Map<String,POJOPropertyBuilder> props, AnnotatedParameter param)
protected void _addMethods(Map<String,POJOPropertyBuilder> props)
protected void _addGetterMethod(Map<String,POJOPropertyBuilder> props, AnnotatedMethod m, AnnotationIntrospector ai)
protected void _addSetterMethod(Map<String,POJOPropertyBuilder> props, AnnotatedMethod m, AnnotationIntrospector ai)
protected void _addInjectables(Map<String,POJOPropertyBuilder> props)
protected void _doAddInjectable(Object id, AnnotatedMember m)
protected void _removeUnwantedProperties(Map<String,POJOPropertyBuilder> props)
protected void _removeUnwantedAccessor(Map<String,POJOPropertyBuilder> props)
protected void _renameProperties(Map<String,POJOPropertyBuilder> props)
protected void _renameUsing(Map<String,POJOPropertyBuilder> propMap, PropertyNamingStrategy naming)
protected void _renameWithWrappers(Map<String,POJOPropertyBuilder> props)
protected void _sortProperties(Map<String,POJOPropertyBuilder> props)
protected void reportProblem(String msg)
protected POJOPropertyBuilder _property(Map<String,POJOPropertyBuilder> props, PropertyName name)
protected POJOPropertyBuilder _property(Map<String,POJOPropertyBuilder> props, String implName)
protected void _updateCreatorProperty(POJOPropertyBuilder prop, List<POJOPropertyBuilder> creatorProperties)
Copyright © 2014–2015 FasterXML. All rights reserved.