public class SettableAnyProperty extends Object implements Serializable
!!! Note: might make sense to refactor to share some code
with SettableBeanProperty?
| Modifier and Type | Field and Description |
|---|---|
protected BeanProperty |
_property
Method used for setting "any" properties, along with annotation
information.
|
protected AnnotatedMethod |
_setter
Annotated variant is needed for JDK serialization only
|
protected JavaType |
_type |
protected JsonDeserializer<Object> |
_valueDeserializer |
protected TypeDeserializer |
_valueTypeDeserializer |
| Modifier | Constructor and Description |
|---|---|
|
SettableAnyProperty(BeanProperty property,
AnnotatedMethod setter,
JavaType type,
JsonDeserializer<Object> valueDeser,
TypeDeserializer typeDeser) |
protected |
SettableAnyProperty(SettableAnyProperty src)
Constructor used for JDK Serialization when reading persisted object
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_throwAsIOE(Exception e,
String propName,
Object value) |
Object |
deserialize(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt) |
void |
deserializeAndSet(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
Object instance,
String propName)
Method called to deserialize appropriate value, given parser (and
context), and set it using appropriate method (a setter method).
|
BeanProperty |
getProperty() |
JavaType |
getType() |
boolean |
hasValueDeserializer() |
void |
set(Object instance,
String propName,
Object value) |
String |
toString() |
SettableAnyProperty |
withValueDeserializer(JsonDeserializer<Object> deser) |
protected final BeanProperty _property
protected final AnnotatedMethod _setter
protected final JavaType _type
protected JsonDeserializer<Object> _valueDeserializer
protected final TypeDeserializer _valueTypeDeserializer
public SettableAnyProperty(BeanProperty property, AnnotatedMethod setter, JavaType type, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)
protected SettableAnyProperty(SettableAnyProperty src)
public SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)
public BeanProperty getProperty()
public boolean hasValueDeserializer()
public JavaType getType()
public final void deserializeAndSet(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
Object instance,
String propName)
throws IOException
IOExceptionpublic Object deserialize(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt) throws IOException
IOExceptionpublic void set(Object instance, String propName, Object value) throws IOException
IOExceptionprotected void _throwAsIOE(Exception e, String propName, Object value) throws IOException
e - Exception to re-throw or wrappropName - Name of property (from Json input) to setvalue - Value of the propertyIOExceptionCopyright © 2014–2015 FasterXML. All rights reserved.