public abstract class SettableBeanProperty extends java.lang.Object implements BeanProperty
Modifier and Type | Class and Description |
---|---|
static class |
SettableBeanProperty.FieldProperty
This concrete sub-class implements property that is set
directly assigning to a Field.
|
static class |
SettableBeanProperty.InnerClassProperty
This sub-class is used to handle special case of value being a
non-static inner class.
|
static class |
SettableBeanProperty.ManagedReferenceProperty
Wrapper property that is used to handle managed (forward) properties
(see [JACKSON-235] for more information).
|
static class |
SettableBeanProperty.MethodProperty
This concrete sub-class implements property that is set
using regular "setter" method.
|
protected static class |
SettableBeanProperty.NullProvider
To support [JACKSON-420] we need bit more indirection; this is used to produce
artificial failure for primitives that don't accept JSON null as value.
|
static class |
SettableBeanProperty.SetterlessProperty
This concrete sub-class implements Collection or Map property that is
indirectly by getting the property value and directly modifying it.
|
BeanProperty.Std
Modifier and Type | Field and Description |
---|---|
protected Annotations |
_contextAnnotations
Class that contains this property (either class that declares
the property or one of its subclasses), class that is
deserialized using deserializer that contains this property.
|
protected java.lang.String |
_managedReferenceName
If property represents a managed (forward) reference
(see [JACKSON-235]), we will need name of reference for
later linking.
|
protected SettableBeanProperty.NullProvider |
_nullProvider
Object used to figure out value to be used when 'null' literal is encountered in JSON.
|
protected int |
_propertyIndex
Index of property (within all property of a bean); assigned
when all properties have been collected.
|
protected java.lang.String |
_propName
Logical name of the property (often but not always derived
from the setter method name)
|
protected JavaType |
_type
Base type for property; may be a supertype of actual value.
|
protected JsonDeserializer<java.lang.Object> |
_valueDeserializer
Deserializer used for handling property value.
|
protected TypeDeserializer |
_valueTypeDeserializer
If value will contain type information (to support
polymorphic handling), this is the type deserializer
used to handle type resolution.
|
Modifier | Constructor and Description |
---|---|
protected |
SettableBeanProperty(SettableBeanProperty src)
Basic copy-constructor for sub-classes to use.
|
protected |
SettableBeanProperty(SettableBeanProperty src,
JsonDeserializer<java.lang.Object> deser)
Copy-with-deserializer-change constructor for sub-classes to use.
|
protected |
SettableBeanProperty(java.lang.String propName,
JavaType type,
TypeDeserializer typeDeser,
Annotations contextAnnotations) |
Modifier and Type | Method and Description |
---|---|
protected java.io.IOException |
_throwAsIOE(java.lang.Exception e) |
protected void |
_throwAsIOE(java.lang.Exception e,
java.lang.Object value)
Method that takes in exception of any type, and casts or wraps it
to an IOException or its subclass.
|
void |
assignIndex(int index)
Method used to assign index for property.
|
java.lang.Object |
deserialize(JsonParser jp,
DeserializationContext ctxt)
This method is needed by some specialized bean deserializers,
and also called by some
deserializeAndSet(org.codehaus.jackson.JsonParser, org.codehaus.jackson.map.DeserializationContext, java.lang.Object) implementations. |
abstract void |
deserializeAndSet(JsonParser jp,
DeserializationContext ctxt,
java.lang.Object instance)
Method called to deserialize appropriate value, given parser (and
context), and set it using appropriate mechanism.
|
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).
|
protected java.lang.Class<?> |
getDeclaringClass() |
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
|
int |
getPropertyIndex()
Method for accessing unique index of this property; indexes are
assigned once all properties of a
BeanDeserializer have
been collected. |
java.lang.String |
getPropertyName()
Deprecated.
Since 1.7, use
getName() instead. |
int |
getProperytIndex()
Deprecated.
Since 1.9: use
getPropertyIndex() instead |
JavaType |
getType()
Method to get declared type of the property.
|
JsonDeserializer<java.lang.Object> |
getValueDeserializer() |
TypeDeserializer |
getValueTypeDeserializer() |
boolean |
hasValueDeserializer() |
boolean |
hasValueTypeDeserializer() |
abstract void |
set(java.lang.Object instance,
java.lang.Object value) |
void |
setManagedReferenceName(java.lang.String n) |
void |
setValueDeserializer(JsonDeserializer<java.lang.Object> deser)
Deprecated.
|
java.lang.String |
toString() |
abstract SettableBeanProperty |
withValueDeserializer(JsonDeserializer<java.lang.Object> deser) |
protected final java.lang.String _propName
protected final JavaType _type
protected final Annotations _contextAnnotations
protected JsonDeserializer<java.lang.Object> _valueDeserializer
protected TypeDeserializer _valueTypeDeserializer
protected SettableBeanProperty.NullProvider _nullProvider
protected java.lang.String _managedReferenceName
protected int _propertyIndex
protected SettableBeanProperty(java.lang.String propName, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations)
protected SettableBeanProperty(SettableBeanProperty src)
protected SettableBeanProperty(SettableBeanProperty src, JsonDeserializer<java.lang.Object> deser)
@Deprecated public void setValueDeserializer(JsonDeserializer<java.lang.Object> deser)
public abstract SettableBeanProperty withValueDeserializer(JsonDeserializer<java.lang.Object> deser)
public void setManagedReferenceName(java.lang.String n)
public void assignIndex(int index)
public final java.lang.String getName()
BeanProperty
getName
in interface BeanProperty
getName
in interface Named
public JavaType getType()
BeanProperty
getType
in interface BeanProperty
public abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> acls)
BeanProperty
getAnnotation
in interface BeanProperty
public abstract AnnotatedMember getMember()
BeanProperty
getMember
in interface BeanProperty
public <A extends java.lang.annotation.Annotation> A getContextAnnotation(java.lang.Class<A> acls)
BeanProperty
getContextAnnotation
in interface BeanProperty
protected final java.lang.Class<?> getDeclaringClass()
@Deprecated public java.lang.String getPropertyName()
getName()
instead.public java.lang.String getManagedReferenceName()
public boolean hasValueDeserializer()
public boolean hasValueTypeDeserializer()
public JsonDeserializer<java.lang.Object> getValueDeserializer()
public TypeDeserializer getValueTypeDeserializer()
public int getPropertyIndex()
BeanDeserializer
have
been collected.@Deprecated public int getProperytIndex()
getPropertyIndex()
insteadpublic java.lang.Object getInjectableValueId()
public abstract void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, java.lang.Object instance) throws java.io.IOException, JsonProcessingException
java.io.IOException
JsonProcessingException
public abstract void set(java.lang.Object instance, java.lang.Object value) throws java.io.IOException
java.io.IOException
public final java.lang.Object deserialize(JsonParser jp, DeserializationContext ctxt) throws java.io.IOException, JsonProcessingException
deserializeAndSet(org.codehaus.jackson.JsonParser, org.codehaus.jackson.map.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).
java.io.IOException
JsonProcessingException
protected void _throwAsIOE(java.lang.Exception e, java.lang.Object value) throws java.io.IOException
java.io.IOException
protected java.io.IOException _throwAsIOE(java.lang.Exception e) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object