Class SettableAnyProperty
java.lang.Object
com.fasterxml.jackson.databind.deser.SettableAnyProperty
- All Implemented Interfaces:
Serializable
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
?
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final KeyDeserializer
protected final BeanProperty
Method used for setting "any" properties, along with annotation information.protected final AnnotatedMember
Annotated variant is needed for JDK serialization onlyprotected final JavaType
protected JsonDeserializer<Object>
protected final TypeDeserializer
-
Constructor Summary
ConstructorsConstructorDescriptionSettableAnyProperty
(BeanProperty property, AnnotatedMember setter, JavaType type, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) Deprecated.SettableAnyProperty
(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_throwAsIOE
(Exception e, Object propName, Object value) deserialize
(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt) final void
deserializeAndSet
(com.fasterxml.jackson.core.JsonParser p, 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).void
fixAccess
(DeserializationConfig config) getType()
boolean
void
toString()
-
Field Details
-
_property
Method used for setting "any" properties, along with annotation information. Retained to allow contextualization of any properties. -
_setter
Annotated variant is needed for JDK serialization only -
_type
-
_valueDeserializer
-
_valueTypeDeserializer
-
_keyDeserializer
- Since:
- 2.9
-
-
Constructor Details
-
SettableAnyProperty
public SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) -
SettableAnyProperty
@Deprecated public SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) Deprecated.
-
-
Method Details
-
withValueDeserializer
-
fixAccess
-
getProperty
-
hasValueDeserializer
public boolean hasValueDeserializer() -
getType
-
deserializeAndSet
public final void deserializeAndSet(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt, Object instance, String propName) throws IOException Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).- Throws:
IOException
-
deserialize
public Object deserialize(com.fasterxml.jackson.core.JsonParser p, DeserializationContext ctxt) throws IOException - Throws:
IOException
-
set
- Throws:
IOException
-
_throwAsIOE
- Parameters:
e
- Exception to re-throw or wrappropName
- Name of property (from Json input) to setvalue
- Value of the property- Throws:
IOException
-
toString
-