|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.deser.SettableAnyProperty
public final class SettableAnyProperty
Class that represents a "wildcard" set method which can be used to generically set values of otherwise unmapped (aka "unknown") properties read from Json content.
!!! Note: might make sense to refactor to share some code
with SettableBeanProperty
?
Field Summary | |
---|---|
protected BeanProperty |
_property
Method used for setting "any" properties, along with annotation information. |
protected Method |
_setter
Physical JDK object used for assigning properties. |
protected JavaType |
_type
|
protected JsonDeserializer<Object> |
_valueDeserializer
|
Constructor Summary | |
---|---|
SettableAnyProperty(BeanProperty property,
AnnotatedMethod setter,
JavaType type)
Deprecated. Since 1.9 - use variant that takes deserializer |
|
SettableAnyProperty(BeanProperty property,
AnnotatedMethod setter,
JavaType type,
JsonDeserializer<Object> valueDeser)
|
|
SettableAnyProperty(BeanProperty property,
Method rawSetter,
JavaType type,
JsonDeserializer<Object> valueDeser)
|
Method Summary | |
---|---|
protected void |
_throwAsIOE(Exception e,
String propName,
Object value)
|
Object |
deserialize(JsonParser jp,
DeserializationContext ctxt)
|
void |
deserializeAndSet(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)
|
void |
setValueDeserializer(JsonDeserializer<Object> deser)
Deprecated. Since 1.9 - construct with deserializer |
String |
toString()
|
SettableAnyProperty |
withValueDeserializer(JsonDeserializer<Object> deser)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final BeanProperty _property
protected final Method _setter
protected final JavaType _type
protected JsonDeserializer<Object> _valueDeserializer
Constructor Detail |
---|
@Deprecated public SettableAnyProperty(BeanProperty property, AnnotatedMethod setter, JavaType type)
public SettableAnyProperty(BeanProperty property, AnnotatedMethod setter, JavaType type, JsonDeserializer<Object> valueDeser)
public SettableAnyProperty(BeanProperty property, Method rawSetter, JavaType type, JsonDeserializer<Object> valueDeser)
Method Detail |
---|
public SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)
@Deprecated public void setValueDeserializer(JsonDeserializer<Object> deser)
public BeanProperty getProperty()
public boolean hasValueDeserializer()
public JavaType getType()
public final void deserializeAndSet(JsonParser jp, DeserializationContext ctxt, Object instance, String propName) throws IOException, JsonProcessingException
IOException
JsonProcessingException
public final Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException
IOException
JsonProcessingException
public final void set(Object instance, String propName, Object value) throws IOException
IOException
protected 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 property
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |