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.
| Modifier and Type | Field and Description |
|---|---|
| protected final AnnotatedParameter | _annotated
Placeholder that represents constructor parameter, when it is created from actual constructor. |
| protected final int | |
| protected SettableBeanProperty | _fallbackSetter
In special cases, when implementing "updateValue", we cannot use constructors or factory methods, but have to fall back on using a setter (or mutable field property). |
| protected boolean | _ignorable
Marker flag that may have to be set during construction, to indicate that although property may have been constructed and added as a placeholder, it represents something that should be ignored during deserialization. |
| protected final JacksonInject. | _injectableValue
Id of value to inject, if value injection should be used for this parameter (in addition to, or instead of, regular deserialization). |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | CreatorProperty(PropertyName name, JavaType type, PropertyName wrapperName, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, JacksonInject.
|
| public | CreatorProperty(PropertyName name, JavaType type, PropertyName wrapperName, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, Object injectableValueId, PropertyMetadata metadata)
Deprecated
Since 2.11 use factory method instead
|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private final void | |
| public static CreatorProperty | construct(PropertyName
Name of the logical property name, JavaType Type of the property, used to find deserializer type, PropertyName Possible wrapper to use for logical property, if any wrapperName, TypeDeserializer Type deserializer to use for handling polymorphic type
information, if one is needed typeDeser, Annotations Contextual annotations (usually by class that
declares creator [constructor, factory method] that includes
this property) contextAnnotations, AnnotatedParameter Representation of property, constructor or factory
method parameter; used for accessing annotations of the property param, int Index of this property within creator invocation index, JacksonInject.Information about injectable value, if any injectable,Factory method for creating |
| public void | deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance)
Implements abstract com. |
| public Object | deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance)
Implements abstract com. deserializeAndSet that returns
either return value of setter method called (if one is),
or null to indicate that no return value is available.
|
| public Object | |
| public void | fixAccess(DeserializationConfig config)
Overrides com. |
| public <A extends Annotation> A | getAnnotation(Class<A> acls)
Implements abstract com. Implements com. |
| public int | getCreatorIndex()
Overrides com. |
| public Object | getInjectableValueId()
Overrides com. |
| public AnnotatedMember | getMember()
Implements abstract com. Implements com. |
| public PropertyMetadata | getMetadata()
Overrides com. Implements com. |
| public void | |
| public boolean | |
| public boolean | isInjectionOnly()
Overrides com. |
| public void | |
| public void | set(Object instance, Object value)
Implements abstract com. |
| public Object | setAndReturn(Object instance, Object value)
Implements abstract com. Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method. |
| public void | setFallbackSetter(SettableBeanProperty fallbackSetter)
Note one exception to immutability, due to problems with CreatorProperty instances being shared between Bean, separate PropertyBasedCreator |
| public String | toString()
Overrides com. |
| public SettableBeanProperty | withName(PropertyName
Name to use for the new instance. newName)Implements abstract com. |
| public SettableBeanProperty | withNullProvider(NullValueProvider nva)
Implements abstract com. |
| public SettableBeanProperty | withValueDeserializer(JsonDeserializer<?>
Deserializer to assign to the new property instance deser)Implements abstract com. |
| _annotated | back to summary |
|---|---|
| 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. | |
| _creatorIndex | back to summary |
|---|---|
protected final int _creatorIndex
| |
| _fallbackSetter | back to summary |
|---|---|
| protected SettableBeanProperty _fallbackSetter In special cases, when implementing "updateValue", we cannot 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.
| |
| _ignorable | back to summary |
|---|---|
| protected boolean _ignorable Marker flag that may have to be set during construction, to indicate that although property may have been constructed and added as a placeholder, it represents something that should be ignored during deserialization. This mostly concerns Creator properties which may not be easily deleted during processing.
| |
| _injectableValue | back to summary |
|---|---|
| protected final JacksonInject. Id of value to inject, if value injection should be used for this parameter (in addition to, or instead of, regular deserialization).
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| CreatorProperty | back to summary |
|---|---|
protected CreatorProperty(PropertyName name, JavaType type, PropertyName wrapperName, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, JacksonInject.
| |
| CreatorProperty | back to summary |
|---|---|
| public CreatorProperty(PropertyName name, JavaType type, PropertyName wrapperName, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, Object injectableValueId, PropertyMetadata metadata)
Deprecated Since 2.11 use factory method instead
| |
| CreatorProperty | back to summary |
|---|---|
protected CreatorProperty(CreatorProperty src, PropertyName newName)
| |
| CreatorProperty | back to summary |
|---|---|
| protected CreatorProperty(CreatorProperty src, JsonDeserializer<?> deser, NullValueProvider nva) | |
| _reportMissingSetter | back to summary |
|---|---|
| private void _reportMissingSetter(JsonParser p, DeserializationContext ctxt) throws IOException | |
| _verifySetter | back to summary |
|---|---|
| private final void _verifySetter() throws IOException | |
| construct | back to summary |
|---|---|
| public static CreatorProperty construct(PropertyName name, JavaType type, PropertyName wrapperName, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, JacksonInject. Factory method for creating
| |
| deserializeAndSet | back to summary |
|---|---|
| public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException Implements abstract com. Doc from com. Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism. Pre-condition is that passed parser must point to the first token that should be consumed to produce the value (the only value for scalars, multiple for Objects and Arrays).
| |
| deserializeSetAndReturn | back to summary |
|---|---|
| public Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException Implements abstract com. Doc from com. Alternative to
| |
| findInjectableValue | back to summary |
|---|---|
| public Object findInjectableValue(DeserializationContext context, Object beanInstance) throws JsonMappingException
Deprecated
| |
| fixAccess | back to summary |
|---|---|
| public void fixAccess(DeserializationConfig config) Overrides com. Doc from com. Method called to ensure that the mutator has proper access rights to be called, as per configuration. Overridden by implementations that have mutators that require access, fields and setters.
| |
| getAnnotation | back to summary |
|---|---|
| public <A extends Annotation> A getAnnotation(Class<A> acls) Implements abstract com. Implements com. Doc from com. Method for finding annotation associated with this property; meaning annotation associated with one of entities used to access property.
Note that this method should only be called for custom annotations;
access to standard Jackson annotations (or ones supported by
alternate
| |
| getCreatorIndex | back to summary |
|---|---|
| public int getCreatorIndex() Overrides com. Doc from com. Method for accessing index of the creator property: for other types of properties will simply return -1.
| |
| getInjectableValueId | back to summary |
|---|---|
| public Object getInjectableValueId() Overrides com. Doc from com. Accessor for id of injectable value, if this bean property supports value injection.
| |
| getMember | back to summary |
|---|---|
| public AnnotatedMember getMember() Implements abstract com. Implements com. Doc from com. Method for accessing primary physical entity that represents the property; annotated field, method or constructor property.
| |
| getMetadata | back to summary |
|---|---|
| public PropertyMetadata getMetadata() Overrides com. Implements com. Doc from com. Accessor for additional optional information about property.
| |
| inject | back to summary |
|---|---|
| public void inject(DeserializationContext context, Object beanInstance) throws IOException
Deprecated
| |
| isIgnorable | back to summary |
|---|---|
| public boolean isIgnorable() Overrides com.
| |
| isInjectionOnly | back to summary |
|---|---|
| public boolean isInjectionOnly() Overrides com. Doc from com. Accessor for checking whether this property is injectable, and if so,
ONLY injectable (will not bind from input).
Currently (2.11) can only return
| |
| markAsIgnorable | back to summary |
|---|---|
| public void markAsIgnorable() Overrides com.
| |
| set | back to summary |
|---|---|
| public void set(Object instance, Object value) throws IOException Implements abstract com. Doc from com. Method called to assign given value to this property, on specified Object. Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
| |
| setAndReturn | back to summary |
|---|---|
| public Object setAndReturn(Object instance, Object value) throws IOException Implements abstract com. Doc from com. Method called to assign given value to this property, on specified Object, and return whatever delegating accessor returned (if anything) Note this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
| |
| setFallbackSetter | back to summary |
|---|---|
| public void setFallbackSetter(SettableBeanProperty fallbackSetter) Note one exception to immutability, due to problems with CreatorProperty instances being shared between Bean, separate PropertyBasedCreator
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides com. Doc from java. Returns a string representation of the object. | |
| withName | back to summary |
|---|---|
| public SettableBeanProperty withName(PropertyName newName) Implements abstract com. Doc from com. Fluent factory method for constructing and returning a new instance with specified property name. Note that this method should NOT change configuration of this instance.
| |
| withNullProvider | back to summary |
|---|---|
| public SettableBeanProperty withNullProvider(NullValueProvider nva) Implements abstract com.
| |
| withValueDeserializer | back to summary |
|---|---|
| public SettableBeanProperty withValueDeserializer(JsonDeserializer<?> deser) Implements abstract com. Doc from com. Fluent factory method for constructing and returning a new instance with specified value deserializer. Note that this method should NOT change configuration of this instance.
| |