Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.introspect

public Class POJOPropertyBuilder

extends BeanPropertyDefinition
implements Comparable<POJOPropertyBuilder>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.*, java.util.stream.Collectors, com.fasterxml.jackson.annotation.*, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.cfg.ConfigOverride, .MapperConfig, com.fasterxml.jackson.databind.type.TypeFactory, com.fasterxml.jackson.databind.util.ClassUtil

Helper class used for aggregating information about a single potential POJO property.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
POJOPropertyBuilder.Linked<T>

Node used for creating simple linked lists to efficiently store small sets of things.

protected static class
private static interface

Field Summary

Modifier and TypeField and Description
protected final AnnotationIntrospector
protected final MapperConfig<?>
protected POJOPropertyBuilder.Linked<AnnotatedParameter>
protected POJOPropertyBuilder.Linked<AnnotatedField>
protected final boolean
_forSerialization

Whether property is being composed for serialization (true) or deserialization (false)

protected POJOPropertyBuilder.Linked<AnnotatedMethod>
protected final PropertyName
_internalName

Original internal name, derived from accessor, of this property.

protected transient PropertyMetadata
protected final PropertyName
_name

External name of logical property; may change with renaming (by new instance being constructed using a new name)

protected transient AnnotationIntrospector.ReferenceProperty
_referenceInfo

Lazily accessed information about this property iff it is a forward or back reference.

protected POJOPropertyBuilder.Linked<AnnotatedMethod>
private static final AnnotationIntrospector.ReferenceProperty
NOT_REFEFERENCE_PROP

Marker value used to denote that no reference-property information found for this property

Inherited from com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition:
EMPTY_INCLUDE

Constructor Summary

AccessConstructor and Description
public
POJOPropertyBuilder(MapperConfig<?> config, AnnotationIntrospector ai, boolean forSerialization, PropertyName internalName)

protected
POJOPropertyBuilder(MapperConfig<?> config, AnnotationIntrospector ai, boolean forSerialization, PropertyName internalName, PropertyName name)

protected

Method Summary

Modifier and TypeMethod and Description
private <T> boolean
private <T> boolean
private <T> boolean
private <T> boolean
private <T> boolean
private <T> boolean
private <T extends AnnotatedMember> POJOPropertyBuilder.Linked<T>
_applyAnnotations(POJOPropertyBuilder.Linked<T> node, AnnotationMap ann)

Helper method to handle recursive merging of annotations within accessor class, to ensure no annotations are accidentally dropped within chain when non-visible and secondary accessors are pruned later on.

private void
private Set<PropertyName>
private <T extends AnnotatedMember> AnnotationMap
_getAllAnnotations(POJOPropertyBuilder.Linked<T> node)

Replacement, as per [databind#868], of simple access to annotations, which does "deep merge" if an as necessary.

protected PropertyMetadata
_getSetterInfo(PropertyMetadata metadata, AnnotatedMember primary)

Helper method that contains logic for accessing and merging all setter information that we needed, regarding things like possible merging of property value, and handling of incoming nulls.

protected int
private boolean
private AnnotationMap
protected Class<?>
private <T> POJOPropertyBuilder.Linked<T>
private <T> POJOPropertyBuilder.Linked<T>
protected AnnotatedMethod
protected AnnotatedMethod

Returns:

Chosen setter method, if any
_selectSetterFromMultiple
(POJOPropertyBuilder.Linked<AnnotatedMethod> curr, POJOPropertyBuilder.Linked<AnnotatedMethod> next)

Helper method called in cases where we have encountered two setter methods that have same precedence and cannot be resolved.

protected int
private <T> POJOPropertyBuilder.Linked<T>
public void
addAll(POJOPropertyBuilder src)

Method for adding all property members from specified collector into this collector.

public void
addCtor(AnnotatedParameter a, PropertyName name, boolean explName, boolean visible, boolean ignored)

public void
addField(AnnotatedField a, PropertyName name, boolean explName, boolean visible, boolean ignored)

public void
addGetter(AnnotatedMethod a, PropertyName name, boolean explName, boolean visible, boolean ignored)

public void
addSetter(AnnotatedMethod a, PropertyName name, boolean explName, boolean visible, boolean ignored)

public boolean
public boolean
public boolean
public int
compareTo(POJOPropertyBuilder
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public boolean
public boolean
public Collection<POJOPropertyBuilder>
explode(Collection<PropertyName> newNames)

Method called when a previous call to findExplicitNames found multiple distinct explicit names, and the property this builder represents basically needs to be broken apart and replaced by a set of more than one properties.

public JsonProperty.Access
public List<PropertyName>
findAliases()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.findAliases.

Method for finding all aliases of the property, if any.

public Set<PropertyName>
findExplicitNames()

Method called to find out set of explicit names for accessors bound together due to implicit name.

public JsonInclude.Value
findInclusion()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.findInclusion.

Method used to check if this property has specific inclusion override associated with it or not.

public ObjectIdInfo
findObjectIdInfo()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.findObjectIdInfo.

Method used to check whether this logical property indicates that value POJOs should be written using additional Object Identifier (or, when multiple references exist, all but first AS Object Identifier).

public AnnotationIntrospector.ReferenceProperty
findReferenceType()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.findReferenceType.

Method used to find whether property is part of a bi-directional reference.

public Class<?>[]
findViews()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.findViews.

Method used to find View-inclusion definitions for the property.

protected <T> T
fromMemberAnnotations(POJOPropertyBuilder.WithMember<T> func)

Helper method used for finding annotation values, from accessors relevant to current usage (deserialization, serialization)

protected <T> T
public AnnotatedParameter
public Iterator<AnnotatedParameter>
getConstructorParameters()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getConstructorParameters.

Additional method that may be called instead of getConstructorParameter() to get access to all constructor parameters, not just the highest priority one.

public AnnotatedField
protected AnnotatedField
getFieldUnchecked()

Variant of getField that does NOT trigger pruning of Field candidates.

public PropertyName
public AnnotatedMethod
protected AnnotatedMethod
getGetterUnchecked()

Variant of getGetter that does NOT trigger pruning of getter candidates.

public String
getInternalName()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getInternalName.

Accessor that can be used to determine implicit name from underlying element(s) before possible renaming.

public PropertyMetadata
getMetadata()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getMetadata.

Method for accessing additional metadata.

public String
getName()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getName.

Implements com.fasterxml.jackson.databind.util.Named.getName.

Accessor for name used for external representation (in JSON).

public AnnotatedMember
getPrimaryMember()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getPrimaryMember.

Method used to find the property member (getter, setter, field) that has the highest precedence in current context (getter method when serializing, if available, and so forth), if any.

protected AnnotatedMember
public JavaType
getPrimaryType()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getPrimaryType.

Type determined from the primary member for the property being built, considering precedence according to whether we are processing serialization or deserialization.

public Class<?>
public AnnotatedMethod
protected AnnotatedMethod
getSetterUnchecked()

Variant of getSetter that does NOT trigger pruning of setter candidates.

public PropertyName
getWrapperName()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.getWrapperName.

Accessor for finding wrapper name to use for property (if any).

public boolean
public boolean

Returns:

True if this property has specified explicit name
hasExplicitName
(PropertyName
Name to check against
name
)

Method find out if this property has specified explicit name: this is generally needed for properties that have not yet been renamed (Creator-detection).

public boolean
public boolean
public boolean
public boolean
public boolean
isExplicitlyIncluded()

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.isExplicitlyIncluded.

Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.

public boolean
isExplicitlyNamed()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.isExplicitlyNamed.

Accessor that can be called to check whether property name was due to an explicit marker (usually annotation), or just by naming convention or use of "use-default-name" marker (annotation).

public boolean
isTypeId()

Overrides com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.isTypeId.

Method used to check whether this logical property has a marker to indicate it should be used as the type id for polymorphic type handling.

private static <T> POJOPropertyBuilder.Linked<T>
public void
mergeAnnotations(boolean forSerialization)

public void
removeConstructors()

Mutator that will simply drop any constructor parameters property may have.

public void
removeFields()

Mutator that will simply drop any fields property may have.

public void
removeIgnored()

Method called to remove all entries that are marked as ignored.

public JsonProperty.Access
removeNonVisible(boolean inferMutators)
Deprecated

public JsonProperty.Access
removeNonVisible(boolean
Whether mutators can be "pulled in" by visible accessors or not.
inferMutators
,
POJOPropertiesCollector parent)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
trimByVisibility()

Method called to trim unnecessary entries, such as implicit getter if there is an explict one available.

public POJOPropertyBuilder
withName(PropertyName newName)

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.withName.

Method that can be used to create a definition with same settings as this one, but with different (external) name; that is, one for which getName() would return newName.

public POJOPropertyBuilder
withSimpleName(String newSimpleName)

Implements abstract com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition.withSimpleName.

Alternate "mutant factory" that will only change simple name, but leave other optional parts (like namespace) as is.

Inherited from com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition:
findReferenceNamegetAccessorgetMutatorgetNonConstructorMutatorisRequired