Class SettableAnyProperty
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.deser.SettableAnyProperty
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SettableAnyProperty.JsonNodeFieldAnyProperty
,SettableAnyProperty.MapFieldAnyProperty
,SettableAnyProperty.MethodAnyProperty
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
protected static class
-
Field Summary
Modifier 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 boolean
protected final JavaType
protected JsonDeserializer<Object>
protected final TypeDeserializer
-
Constructor Summary
ConstructorDescriptionSettableAnyProperty
(BeanProperty property, AnnotatedMember setter, JavaType type, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
protected void
_throwAsIOE
(Exception e, Object propName, Object value) static SettableAnyProperty
constructForJsonNodeField
(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<Object> valueDeser) static SettableAnyProperty
constructForMapField
(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) static SettableAnyProperty
constructForMethod
(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) deserialize
(JsonParser p, DeserializationContext ctxt) 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).void
fixAccess
(DeserializationConfig config) getType()
boolean
void
toString()
abstract SettableAnyProperty
-
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 -
_setterIsField
protected final boolean _setterIsField -
_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)
-
-
Method Details
-
constructForMethod
public static SettableAnyProperty constructForMethod(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) - Since:
- 2.14
-
constructForMapField
public static SettableAnyProperty constructForMapField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, KeyDeserializer keyDeser, JsonDeserializer<Object> valueDeser, TypeDeserializer typeDeser) - Since:
- 2.14
-
constructForJsonNodeField
public static SettableAnyProperty constructForJsonNodeField(DeserializationContext ctxt, BeanProperty property, AnnotatedMember field, JavaType valueType, JsonDeserializer<Object> valueDeser) - Since:
- 2.14
-
withValueDeserializer
-
fixAccess
-
getProperty
-
hasValueDeserializer
public boolean hasValueDeserializer() -
getType
-
getPropertyName
- Since:
- 2.14
-
deserializeAndSet
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).- Throws:
IOException
-
deserialize
- Throws:
IOException
-
set
- Throws:
IOException
-
_set
- Throws:
Exception
-
_throwAsIOE
- Parameters:
e
- Exception to re-throw or wrappropName
- Name of property (from Json input) to setvalue
- Value of the property- Throws:
IOException
-
toString
-