Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.deser

public abstract Class SettableAnyProperty

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.fasterxml.jackson.databind.deser.SettableAnyProperty.MethodAnyProperty, com.fasterxml.jackson.databind.deser.SettableAnyProperty.MapFieldAnyProperty, com.fasterxml.jackson.databind.deser.SettableAnyProperty.JsonNodeFieldAnyProperty
Imports
java.io.IOException, java.util.LinkedHashMap, .Map, com.fasterxml.jackson.core.*, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.deser.impl.JDKValueInstantiators, .ReadableObjectId.Referring, com.fasterxml.jackson.databind.introspect.AnnotatedField, .AnnotatedMember, .AnnotatedMethod, com.fasterxml.jackson.databind.jsontype.TypeDeserializer, com.fasterxml.jackson.databind.node.JsonNodeFactory, .ObjectNode, com.fasterxml.jackson.databind.util.ClassUtil

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
protected static class
protected static class
protected static class

Field Summary

Modifier and TypeField and Description
protected final KeyDeserializer
protected final BeanProperty
_property

Method used for setting "any" properties, along with annotation information.

protected final AnnotatedMember
_setter

Annotated variant is needed for JDK serialization only

protected final boolean
protected final JavaType
protected JsonDeserializer<Object>
protected final TypeDeserializer
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected abstract void
_set(Object instance, Object propName, Object value)

protected void
_throwAsIOE(Exception
Exception to re-throw or wrap
e
,
Object
Name of property (from Json input) to set
propName
,
Object
Value of the property
value
)

public static SettableAnyProperty
public static SettableAnyProperty
public static SettableAnyProperty
public Object
public void
deserializeAndSet(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).

public void
private String
public BeanProperty
public String
public JavaType
public boolean
pack-priv Object
readResolve()

Need to define this to verify that we retain actual Method reference

public void
set(Object instance, Object propName, Object value)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public abstract SettableAnyProperty
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_keyDeserializerback to summary
protected final KeyDeserializer _keyDeserializer
Since
2.9
_propertyback to summary
protected final BeanProperty _property

Method used for setting "any" properties, along with annotation information. Retained to allow contextualization of any properties.

_setterback to summary
protected final AnnotatedMember _setter

Annotated variant is needed for JDK serialization only

_setterIsFieldback to summary
protected final boolean _setterIsField
_typeback to summary
protected final JavaType _type
_valueDeserializerback to summary
protected JsonDeserializer<Object> _valueDeserializer
_valueTypeDeserializerback to summary
protected final TypeDeserializer _valueTypeDeserializer
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

SettableAnyPropertyback to summary
public SettableAnyProperty(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)

Method Detail

_setback to summary
protected abstract void _set(Object instance, Object propName, Object value) throws Exception
_throwAsIOEback to summary
protected void _throwAsIOE(Exception e, Object propName, Object value) throws IOException
Parameters
e:Exception

Exception to re-throw or wrap

propName:Object

Name of property (from Json input) to set

value:Object

Value of the property

constructForJsonNodeFieldback to summary
public static SettableAnyProperty constructForJsonNodeField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<Object> valueDeser)
Since
2.14
constructForMapFieldback to summary
public static SettableAnyProperty constructForMapField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)
Since
2.14
constructForMethodback to summary
public static SettableAnyProperty constructForMethod(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)
Since
2.14
deserializeback to summary
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException
deserializeAndSetback to summary
public void deserializeAndSet(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).

fixAccessback to summary
public void fixAccess(DeserializationConfig config)
getClassNameback to summary
private String getClassName()
getPropertyback to summary
public BeanProperty getProperty()
getPropertyNameback to summary
public String getPropertyName()
Since
2.14
getTypeback to summary
public JavaType getType()
hasValueDeserializerback to summary
public boolean hasValueDeserializer()
readResolveback to summary
pack-priv Object readResolve()

Need to define this to verify that we retain actual Method reference

setback to summary
public void set(Object instance, Object propName, Object value) throws IOException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
withValueDeserializerback to summary
public abstract SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)
com.fasterxml.jackson.databind.deser back to summary

private Class SettableAnyProperty.AnySetterReferring

extends Referring
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final SettableAnyProperty
private final Object
private final String

Constructor Summary

AccessConstructor and Description
public
AnySetterReferring(SettableAnyProperty parent, UnresolvedForwardReference reference, Class<?> type, Object instance, String propName)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from com.fasterxml.jackson.databind.deser.impl.ReadableObjectId.Referring:
getBeanTypegetLocationhasId

Field Detail

_parentback to summary
private final SettableAnyProperty _parent
_pojoback to summary
private final Object _pojo
_propNameback to summary
private final String _propName

Constructor Detail

AnySetterReferringback to summary
public AnySetterReferring(SettableAnyProperty parent, UnresolvedForwardReference reference, Class<?> type, Object instance, String propName)

Method Detail

handleResolvedForwardReferenceback to summary
public void handleResolvedForwardReference(Object id, Object value) throws IOException

Implements abstract com.fasterxml.jackson.databind.deser.impl.ReadableObjectId.Referring.handleResolvedForwardReference.

Annotations
@Override
com.fasterxml.jackson.databind.deser back to summary

protected Class SettableAnyProperty.JsonNodeFieldAnyProperty

extends SettableAnyProperty
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Since
2.14

Field Summary

Modifier and TypeField and Description
protected final JsonNodeFactory
private static final long
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_keyDeserializer_property_setter_setterIsField_type_valueDeserializer_valueTypeDeserializer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
public Object
public void
deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance, String propName)

Overrides com.fasterxml.jackson.databind.deser.SettableAnyProperty.deserializeAndSet.

Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).
protected void
setProperty(Object instance, String propName, JsonNode value)

public SettableAnyProperty
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_throwAsIOEconstructForJsonNodeFieldconstructForMapFieldconstructForMethodfixAccessgetPropertygetPropertyNamegetTypehasValueDeserializerreadResolvesettoString

Field Detail

_nodeFactoryback to summary
protected final JsonNodeFactory _nodeFactory
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.SettableAnyProperty.serialVersionUID.

Constructor Detail

JsonNodeFieldAnyPropertyback to summary
public JsonNodeFieldAnyProperty(BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<Object> valueDeser, JsonNodeFactory nodeFactory)

Method Detail

_setback to summary
protected void _set(Object instance, Object propName, Object value) throws Exception

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty._set.

Annotations
@Override
deserializeback to summary
public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException

Overrides com.fasterxml.jackson.databind.deser.SettableAnyProperty.deserialize.

Annotations
@Override
deserializeAndSetback to summary
public void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance, String propName) throws IOException

Overrides com.fasterxml.jackson.databind.deser.SettableAnyProperty.deserializeAndSet.

Doc from com.fasterxml.jackson.databind.deser.SettableAnyProperty.deserializeAndSet.

Method called to deserialize appropriate value, given parser (and context), and set it using appropriate method (a setter method).

Annotations
@Override
setPropertyback to summary
protected void setProperty(Object instance, String propName, JsonNode value) throws IOException
withValueDeserializerback to summary
public SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty.withValueDeserializer.

Annotations
@Override
com.fasterxml.jackson.databind.deser back to summary

protected Class SettableAnyProperty.MapFieldAnyProperty

extends SettableAnyProperty
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Since
2.14

Field Summary

Modifier and TypeField and Description
protected final ValueInstantiator
private static final long
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_keyDeserializer_property_setter_setterIsField_type_valueDeserializer_valueTypeDeserializer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Map<Object, Object>
protected void
public SettableAnyProperty
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_throwAsIOEconstructForJsonNodeFieldconstructForMapFieldconstructForMethoddeserializedeserializeAndSetfixAccessgetPropertygetPropertyNamegetTypehasValueDeserializerreadResolvesettoString

Field Detail

_valueInstantiatorback to summary
protected final ValueInstantiator _valueInstantiator
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.SettableAnyProperty.serialVersionUID.

Constructor Detail

MapFieldAnyPropertyback to summary
public MapFieldAnyProperty(BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser, ValueInstantiator inst)

Method Detail

_createAndSetMapback to summary
protected Map<Object, Object> _createAndSetMap(DeserializationContext ctxt, AnnotatedField field, Object instance, Object propName) throws IOException
Annotations
@SuppressWarnings:unchecked
_setback to summary
protected void _set(Object instance, Object propName, Object value) throws Exception

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty._set.

Annotations
@SuppressWarnings:unchecked
@Override
withValueDeserializerback to summary
public SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty.withValueDeserializer.

Annotations
@Override
com.fasterxml.jackson.databind.deser back to summary

protected Class SettableAnyProperty.MethodAnyProperty

extends SettableAnyProperty
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

Since
2.14

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_keyDeserializer_property_setter_setterIsField_type_valueDeserializer_valueTypeDeserializer

Constructor Summary

AccessConstructor and Description
public
MethodAnyProperty(BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)

Method Summary

Modifier and TypeMethod and Description
protected void
public SettableAnyProperty
Inherited from com.fasterxml.jackson.databind.deser.SettableAnyProperty:
_throwAsIOEconstructForJsonNodeFieldconstructForMapFieldconstructForMethoddeserializedeserializeAndSetfixAccessgetPropertygetPropertyNamegetTypehasValueDeserializerreadResolvesettoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.SettableAnyProperty.serialVersionUID.

Constructor Detail

MethodAnyPropertyback to summary
public MethodAnyProperty(BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser)

Method Detail

_setback to summary
protected void _set(Object instance, Object propName, Object value) throws Exception

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty._set.

Annotations
@Override
withValueDeserializerback to summary
public SettableAnyProperty withValueDeserializer(JsonDeserializer<Object> deser)

Implements abstract com.fasterxml.jackson.databind.deser.SettableAnyProperty.withValueDeserializer.

Annotations
@Override