Class SettableAnyProperty
- java.lang.Object
-
- com.fasterxml.jackson.databind.deser.SettableAnyProperty
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class SettableAnyProperty extends java.lang.Object implements java.io.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: starting with 2.14, is
abstract
class with multiple concrete implementations- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SettableAnyProperty
constructForJsonNodeField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<java.lang.Object> valueDeser)
static SettableAnyProperty
constructForMapField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
static SettableAnyProperty
constructForMethod(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
java.lang.Object
deserialize(JsonParser p, DeserializationContext ctxt)
void
deserializeAndSet(JsonParser p, DeserializationContext ctxt, java.lang.Object instance, java.lang.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)
BeanProperty
getProperty()
java.lang.String
getPropertyName()
JavaType
getType()
boolean
hasValueDeserializer()
void
set(java.lang.Object instance, java.lang.Object propName, java.lang.Object value)
java.lang.String
toString()
abstract SettableAnyProperty
withValueDeserializer(JsonDeserializer<java.lang.Object> deser)
-
-
-
Constructor Detail
-
SettableAnyProperty
public SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
-
-
Method Detail
-
constructForMethod
public static SettableAnyProperty constructForMethod(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
- Since:
- 2.14
-
constructForMapField
public static SettableAnyProperty constructForMapField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<java.lang.Object> valueDeser, TypeDeserializer typeDeser)
- Since:
- 2.14
-
constructForJsonNodeField
public static SettableAnyProperty constructForJsonNodeField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<java.lang.Object> valueDeser)
- Since:
- 2.14
-
withValueDeserializer
public abstract SettableAnyProperty withValueDeserializer(JsonDeserializer<java.lang.Object> deser)
-
fixAccess
public void fixAccess(DeserializationConfig config)
-
getProperty
public BeanProperty getProperty()
-
hasValueDeserializer
public boolean hasValueDeserializer()
-
getType
public JavaType getType()
-
getPropertyName
public java.lang.String getPropertyName()
- Since:
- 2.14
-
deserializeAndSet
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, java.lang.Object instance, java.lang.String propName) throws java.io.IOException
Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).- Throws:
java.io.IOException
-
deserialize
public java.lang.Object deserialize(JsonParser p, DeserializationContext ctxt) throws java.io.IOException
- Throws:
java.io.IOException
-
set
public void set(java.lang.Object instance, java.lang.Object propName, java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-