|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.deser.SettableBeanProperty
public abstract class SettableBeanProperty
Base class for settable properties of a bean: contains both type and name definitions, and reflection-based set functionality. Concrete sub-classes implement details, so that both field- and setter-backed properties can be handled
Nested Class Summary | |
---|---|
static class |
SettableBeanProperty.CreatorProperty
This concrete sub-class implements property that is passed via Creator (constructor or static factory method). |
static class |
SettableBeanProperty.FieldProperty
This concrete sub-class implements property that is set directly assigning to a Field. |
static class |
SettableBeanProperty.MethodProperty
This concrete sub-class implements property that is set using regular "setter" method. |
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. |
Field Summary | |
---|---|
protected Object |
_nullValue
Value to be used when 'null' literal is encountered in Json. |
protected JsonDeserializer<Object> |
_valueDeserializer
|
Constructor Summary | |
---|---|
SettableBeanProperty(String propName,
JavaType type)
|
Method Summary | |
---|---|
protected IOException |
_throwAsIOE(Exception e)
|
protected void |
_throwAsIOE(Exception e,
Object value)
Method that takes in exception of any type, and casts or wraps it to an IOException or its subclass. |
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,
Object instance)
Method called to deserialize appropriate value, given parser (and context), and set it using appropriate mechanism |
int |
getCreatorIndex()
Method to use for accessing index of the property (related to other properties in the same context); currently only applicable to "Creator properties". |
protected abstract Class<?> |
getDeclaringClass()
|
String |
getPropertyName()
|
JavaType |
getType()
|
boolean |
hasValueDeserializer()
|
abstract void |
set(Object instance,
Object value)
|
void |
setValueDeserializer(JsonDeserializer<Object> deser)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JsonDeserializer<Object> _valueDeserializer
protected Object _nullValue
Constructor Detail |
---|
public SettableBeanProperty(String propName, JavaType type)
Method Detail |
---|
public void setValueDeserializer(JsonDeserializer<Object> deser)
protected abstract Class<?> getDeclaringClass()
public String getPropertyName()
public JavaType getType()
public boolean hasValueDeserializer()
public int getCreatorIndex()
Base implementation returns -1 to indicate that no index exists for the property.
public abstract void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, Object instance) throws IOException, JsonProcessingException
IOException
JsonProcessingException
public abstract void set(Object instance, Object value) throws IOException
IOException
public final Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
deserializeAndSet(org.codehaus.jackson.JsonParser, org.codehaus.jackson.map.DeserializationContext, java.lang.Object)
implementations.
IOException
JsonProcessingException
protected void _throwAsIOE(Exception e, Object value) throws IOException
IOException
protected IOException _throwAsIOE(Exception e) throws IOException
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |