Class POJOPropertyBuilder

    • Method Detail

      • getInternalName

        public java.lang.String getInternalName()
        Description copied from class: BeanPropertyDefinition
        Accessor that can be used to determine implicit name from underlying element(s) before possible renaming. This is the "internal" name derived from accessor ("x" from "getX"), and is not based on annotations or naming strategy.
        Specified by:
        getInternalName in class BeanPropertyDefinition
      • isExplicitlyIncluded

        public boolean isExplicitlyIncluded()
        Description copied from class: BeanPropertyDefinition
        Accessor that can be called to check whether property was included due to an explicit marker (usually annotation), or just by naming convention.
        Specified by:
        isExplicitlyIncluded in class BeanPropertyDefinition
        Returns:
        True if property was explicitly included (usually by having one of components being annotated); false if inclusion was purely due to naming or visibility definitions (that is, implicit)
      • _getSetterInfo

        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. Only called for deserialization purposes.
      • getPrimaryType

        public JavaType getPrimaryType()
        Type determined from the primary member for the property being built, considering precedence according to whether we are processing serialization or deserialization.
        Specified by:
        getPrimaryType in class BeanPropertyDefinition
      • getGetterUnchecked

        protected AnnotatedMethod getGetterUnchecked()
        Variant of getGetter() that does NOT trigger pruning of getter candidates.
      • getSetterUnchecked

        protected AnnotatedMethod getSetterUnchecked()
        Variant of getSetter() that does NOT trigger pruning of setter candidates.
      • _selectSetterFromMultiple

        protected AnnotatedMethod _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. This does not yet necessarily mean a failure since it is possible something with a higher precedence could still be found; handling is just separated into separate method for convenience.
        Parameters:
        curr -
        next -
        Returns:
        Chosen setter method, if any
        Throws:
        java.lang.IllegalArgumentException - If conflict could not be resolved
        Since:
        2.13
      • getFieldUnchecked

        protected AnnotatedField getFieldUnchecked()
        Variant of getField() that does NOT trigger pruning of Field candidates.
      • getPrimaryMember

        public AnnotatedMember getPrimaryMember()
        Description copied from class: BeanPropertyDefinition
        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.

        Note: may throw IllegalArgumentException in case problems are found trying to getter or setter info.

        Note: abstract since 2.5

        Specified by:
        getPrimaryMember in class BeanPropertyDefinition
      • getPrimaryMemberUnchecked

        protected AnnotatedMember getPrimaryMemberUnchecked()
      • isTypeId

        public boolean isTypeId()
        Description copied from class: BeanPropertyDefinition
        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.
        Overrides:
        isTypeId in class BeanPropertyDefinition
      • findObjectIdInfo

        public ObjectIdInfo findObjectIdInfo()
        Description copied from class: BeanPropertyDefinition
        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).
        Overrides:
        findObjectIdInfo in class BeanPropertyDefinition
      • findInclusion

        public com.fasterxml.jackson.annotation.JsonInclude.Value findInclusion()
        Description copied from class: BeanPropertyDefinition
        Method used to check if this property has specific inclusion override associated with it or not. It should NOT check for any default settings (global, per-type, or containing POJO settings)
        Specified by:
        findInclusion in class BeanPropertyDefinition
      • findAccess

        public com.fasterxml.jackson.annotation.JsonProperty.Access findAccess()
      • addField

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

        public void addAll​(POJOPropertyBuilder src)
        Method for adding all property members from specified collector into this collector.
      • removeIgnored

        public void removeIgnored()
        Method called to remove all entries that are marked as ignored.
      • removeNonVisible

        @Deprecated
        public com.fasterxml.jackson.annotation.JsonProperty.Access removeNonVisible​(boolean inferMutators)
        Deprecated.
      • removeNonVisible

        public com.fasterxml.jackson.annotation.JsonProperty.Access removeNonVisible​(boolean inferMutators,
                                                                                     POJOPropertiesCollector parent)
        Parameters:
        inferMutators - Whether mutators can be "pulled in" by visible accessors or not.
        Since:
        2.12 (earlier had different signature)
      • removeConstructors

        public void removeConstructors()
        Mutator that will simply drop any constructor parameters property may have.
        Since:
        2.5
      • removeFields

        public void removeFields()
        Mutator that will simply drop any fields property may have.
        Since:
        2.18
      • trimByVisibility

        public void trimByVisibility()
        Method called to trim unnecessary entries, such as implicit getter if there is an explict one available. This is important for later stages, to avoid unnecessary conflicts.
      • mergeAnnotations

        public void mergeAnnotations​(boolean forSerialization)
      • anyVisible

        public boolean anyVisible()
      • anyIgnorals

        public boolean anyIgnorals()
      • anyExplicitsWithoutIgnoral

        public boolean anyExplicitsWithoutIgnoral()
      • findExplicitNames

        public java.util.Set<PropertyName> findExplicitNames()
        Method called to find out set of explicit names for accessors bound together due to implicit name.
        Since:
        2.4
      • hasExplicitName

        public boolean hasExplicitName​(PropertyName 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).
        Parameters:
        name - Name to check against
        Returns:
        True if this property has specified explicit name
        Since:
        2.18.2
      • explode

        public java.util.Collection<POJOPropertyBuilder> explode​(java.util.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.
        Since:
        2.4
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • fromMemberAnnotations

        protected <T> T fromMemberAnnotations​(com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.WithMember<T> func)
        Helper method used for finding annotation values, from accessors relevant to current usage (deserialization, serialization)
      • fromMemberAnnotationsExcept

        protected <T> T fromMemberAnnotationsExcept​(com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.WithMember<T> func,
                                                    T defaultValue)
      • _rawTypeOf

        protected java.lang.Class<?> _rawTypeOf​(AnnotatedMember m)