com.fasterxml.jackson.databind.deser

Class CreatorProperty

  • All Implemented Interfaces:
    BeanProperty, Named, Serializable


    public class CreatorProperty
    extends SettableBeanProperty
    This concrete sub-class implements property that is passed via Creator (constructor or static factory method). It is not a full-featured implementation in that its set method should never be called -- instead, value must separately passed.

    Note on injectable values: unlike with other mutators, where deserializer and injecting are separate, here we treat the two as related things. This is necessary to add proper priority, as well as to simplify coordination.

    See Also:
    Serialized Form
    • Field Detail

      • _annotated

        protected final AnnotatedParameter _annotated
        Placeholder that represents constructor parameter, when it is created from actual constructor. May be null when a synthetic instance is created.
      • _injectableValueId

        protected final Object _injectableValueId
        Id of value to inject, if value injection should be used for this parameter (in addition to, or instead of, regular deserialization).
      • _creatorIndex

        protected final int _creatorIndex
        Since:
        2.1
      • _fallbackSetter

        protected SettableBeanProperty _fallbackSetter
        In special cases, when implementing "updateValue", we can not use constructors or factory methods, but have to fall back on using a setter (or mutable field property). If so, this refers to that fallback accessor.

        Mutable only to allow setting after construction, but must be strictly set before any use.

        Since:
        2.3
    • Constructor Detail

      • CreatorProperty

        public CreatorProperty(PropertyName name,
                       JavaType type,
                       PropertyName wrapperName,
                       TypeDeserializer typeDeser,
                       Annotations contextAnnotations,
                       AnnotatedParameter param,
                       int index,
                       Object injectableValueId,
                       PropertyMetadata metadata)
        Parameters:
        name - Name of the logical property
        type - Type of the property, used to find deserializer
        typeDeser - Type deserializer to use for handling polymorphic type information, if one is needed
        contextAnnotations - Contextual annotations (usually by class that declares creator [constructor, factory method] that includes this property)
        param - Representation of property, constructor or factory method parameter; used for accessing annotations of the property
        index - Index of this property within creator invocation
        Since:
        2.3

Copyright © 2008–2016 FasterXML. All rights reserved.