public abstract class SettableBeanProperty extends ConcreteBeanPropertyBase implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
SettableBeanProperty.Delegating
Helper class that is designed to both make it easier to sub-class
delegating subtypes and to reduce likelihood of breakage when
new methods are added.
|
BeanProperty.Bogus, BeanProperty.Std
EMPTY_FORMAT, EMPTY_INCLUDE
Modifier and Type | Method and Description |
---|---|
void |
assignIndex(int index)
Method used to assign index for property.
|
void |
depositSchemaProperty(JsonObjectFormatVisitor objectVisitor,
SerializerProvider provider)
Method that can be called to visit the type structure that this
property is part of.
|
java.lang.Object |
deserialize(JsonParser p,
DeserializationContext ctxt)
This method is needed by some specialized bean deserializers,
and also called by some
deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object) implementations. |
abstract void |
deserializeAndSet(JsonParser p,
DeserializationContext ctxt,
java.lang.Object instance)
Method called to deserialize appropriate value, given parser (and
context), and set it using appropriate mechanism.
|
abstract java.lang.Object |
deserializeSetAndReturn(JsonParser p,
DeserializationContext ctxt,
java.lang.Object instance)
Alternative to
deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object) that returns
either return value of setter method called (if one is),
or null to indicate that no return value is available. |
java.lang.Object |
deserializeWith(JsonParser p,
DeserializationContext ctxt,
java.lang.Object toUpdate) |
void |
fixAccess(DeserializationConfig config)
Method called to ensure that the mutator has proper access rights to
be called, as per configuration.
|
abstract <A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> acls)
Method for finding annotation associated with this property;
meaning annotation associated with one of entities used to
access property.
|
<A extends java.lang.annotation.Annotation> |
getContextAnnotation(java.lang.Class<A> acls)
Method for finding annotation associated with context of
this property; usually class in which member is declared
(or its subtype if processing subtype).
|
int |
getCreatorIndex()
Method for accessing index of the creator property: for other
types of properties will simply return -1.
|
PropertyName |
getFullName()
Method for getting full name definition, including possible
format-specific additional properties (such as namespace when
using XML backend).
|
java.lang.Object |
getInjectableValueId()
Accessor for id of injectable value, if this bean property supports
value injection.
|
java.lang.String |
getManagedReferenceName() |
abstract AnnotatedMember |
getMember()
Method for accessing primary physical entity that represents the property;
annotated field, method or constructor property.
|
java.lang.String |
getName()
Method to get logical name of the property
|
NullValueProvider |
getNullValueProvider() |
ObjectIdInfo |
getObjectIdInfo() |
int |
getPropertyIndex()
Method for accessing unique index of this property; indexes are
assigned once all properties of a
BeanDeserializer have
been collected. |
JavaType |
getType()
Method to get declared type of the property.
|
JsonDeserializer<java.lang.Object> |
getValueDeserializer() |
TypeDeserializer |
getValueTypeDeserializer() |
PropertyName |
getWrapperName()
If property is indicated to be wrapped, name of
wrapper element to use.
|
boolean |
hasValueDeserializer() |
boolean |
hasValueTypeDeserializer() |
boolean |
hasViews() |
boolean |
isIgnorable() |
void |
markAsIgnorable() |
abstract void |
set(java.lang.Object instance,
java.lang.Object value)
Method called to assign given value to this property, on
specified Object.
|
abstract java.lang.Object |
setAndReturn(java.lang.Object instance,
java.lang.Object value)
Method called to assign given value to this property, on
specified Object, and return whatever delegating accessor
returned (if anything)
|
void |
setManagedReferenceName(java.lang.String n) |
void |
setObjectIdInfo(ObjectIdInfo objectIdInfo) |
void |
setViews(java.lang.Class<?>[] views) |
java.lang.String |
toString() |
boolean |
visibleInView(java.lang.Class<?> activeView) |
abstract SettableBeanProperty |
withName(PropertyName newName)
Fluent factory method for constructing and returning a new instance
with specified property name.
|
abstract SettableBeanProperty |
withNullProvider(NullValueProvider nva) |
SettableBeanProperty |
withSimpleName(java.lang.String simpleName) |
abstract SettableBeanProperty |
withValueDeserializer(JsonDeserializer<?> deser)
Fluent factory method for constructing and returning a new instance
with specified value deserializer.
|
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
public abstract SettableBeanProperty withValueDeserializer(JsonDeserializer<?> deser)
deser
- Deserializer to assign to the new property instancepublic abstract SettableBeanProperty withName(PropertyName newName)
newName
- Name to use for the new instance.public SettableBeanProperty withSimpleName(java.lang.String simpleName)
public abstract SettableBeanProperty withNullProvider(NullValueProvider nva)
public void setManagedReferenceName(java.lang.String n)
public void setObjectIdInfo(ObjectIdInfo objectIdInfo)
public void setViews(java.lang.Class<?>[] views)
public void assignIndex(int index)
public void fixAccess(DeserializationConfig config)
public void markAsIgnorable()
public boolean isIgnorable()
public final java.lang.String getName()
BeanProperty
getName
in interface BeanProperty
getName
in interface Named
public PropertyName getFullName()
BeanProperty
getFullName
in interface BeanProperty
public JavaType getType()
BeanProperty
getType
in interface BeanProperty
public PropertyName getWrapperName()
BeanProperty
getWrapperName
in interface BeanProperty
public abstract AnnotatedMember getMember()
BeanProperty
getMember
in interface BeanProperty
public abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> acls)
BeanProperty
Note that this method should only be called for custom annotations;
access to standard Jackson annotations (or ones supported by
alternate AnnotationIntrospector
s) should be accessed
through AnnotationIntrospector
.
getAnnotation
in interface BeanProperty
public <A extends java.lang.annotation.Annotation> A getContextAnnotation(java.lang.Class<A> acls)
BeanProperty
Note that this method should only be called for custom annotations;
access to standard Jackson annotations (or ones supported by
alternate AnnotationIntrospector
s) should be accessed
through AnnotationIntrospector
.
getContextAnnotation
in interface BeanProperty
public void depositSchemaProperty(JsonObjectFormatVisitor objectVisitor, SerializerProvider provider) throws JsonMappingException
BeanProperty
UnsupportedOperationException
.
NOTE: Starting with 2.7, takes explicit SerializerProvider
argument to reduce the need to rely on provider visitor may or may not
have assigned.
depositSchemaProperty
in interface BeanProperty
objectVisitor
- Visitor to used as the callback handlerJsonMappingException
public java.lang.String getManagedReferenceName()
public ObjectIdInfo getObjectIdInfo()
public boolean hasValueDeserializer()
public boolean hasValueTypeDeserializer()
public JsonDeserializer<java.lang.Object> getValueDeserializer()
public TypeDeserializer getValueTypeDeserializer()
public NullValueProvider getNullValueProvider()
public boolean visibleInView(java.lang.Class<?> activeView)
public boolean hasViews()
public int getPropertyIndex()
BeanDeserializer
have
been collected.public int getCreatorIndex()
public java.lang.Object getInjectableValueId()
public abstract void deserializeAndSet(JsonParser p, DeserializationContext ctxt, java.lang.Object instance) throws java.io.IOException
java.io.IOException
public abstract java.lang.Object deserializeSetAndReturn(JsonParser p, DeserializationContext ctxt, java.lang.Object instance) throws java.io.IOException
deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object)
that returns
either return value of setter method called (if one is),
or null to indicate that no return value is available.
Mostly used to support Builder style deserialization.java.io.IOException
public abstract void set(java.lang.Object instance, java.lang.Object value) throws java.io.IOException
Note: this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
java.io.IOException
public abstract java.lang.Object setAndReturn(java.lang.Object instance, java.lang.Object value) throws java.io.IOException
Note: this is an optional operation, not supported by all implementations, creator-backed properties for example do not support this method.
java.io.IOException
public final java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
deserializeAndSet(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object)
implementations.
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).
Note that this method is final for performance reasons: to override functionality you must override other methods that call this method; this method should also not be called directly unless you really know what you are doing (and probably not even then).
java.io.IOException
public final java.lang.Object deserializeWith(JsonParser p, DeserializationContext ctxt, java.lang.Object toUpdate) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"