Top Description Inners Constructors Methods
tools.jackson.databind

public abstract Class InjectableValues

extends Object
implements Snapshottable<InjectableValues>
Class Inheritance
All Implemented Interfaces
tools.jackson.core.util.Snapshottable
Known Direct Subclasses
tools.jackson.databind.InjectableValues.Std
Imports
java.util.*, tools.jackson.core.JacksonException, tools.jackson.core.util.Snapshottable, tools.jackson.databind.util.ClassUtil

Abstract class that defines API for objects that provide value to "inject" during deserialization. An instance of this object

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
InjectableValues.Std

Simple standard implementation which uses a simple Map to store values to inject, identified by simple String keys.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Object
findInjectableValue(DeserializationContext
Deserialization context
ctxt
,
Object
Object that identifies value to inject; may be a simple name or more complex identifier object, whatever provider needs
valueId
,
BeanProperty
Bean property in which value is to be injected
forProperty
,
Object
Bean instance that contains property to inject, if available; null if bean has not yet been constructed.
beanInstance
,
Boolean
Flag used for configuring the behavior when the value to inject is not found
optional
,
Boolean useInput)

Method called to find value identified by id valueId to inject as value of specified property during deserialization, passing POJO instance in which value will be injected if it is available (will be available when injected via field or setter; not available when injected via constructor or factory method argument).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InjectableValuesback to summary
public InjectableValues()

Method Detail

findInjectableValueback to summary
public abstract Object findInjectableValue(DeserializationContext ctxt, Object valueId, BeanProperty forProperty, Object beanInstance, Boolean optional, Boolean useInput) throws JacksonException

Method called to find value identified by id valueId to inject as value of specified property during deserialization, passing POJO instance in which value will be injected if it is available (will be available when injected via field or setter; not available when injected via constructor or factory method argument).

Parameters
ctxt:DeserializationContext

Deserialization context

valueId:Object

Object that identifies value to inject; may be a simple name or more complex identifier object, whatever provider needs

forProperty:BeanProperty

Bean property in which value is to be injected

beanInstance:Object

Bean instance that contains property to inject, if available; null if bean has not yet been constructed.

optional:Boolean

Flag used for configuring the behavior when the value to inject is not found

tools.jackson.databind back to summary

public Class InjectableValues.Std

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

Simple standard implementation which uses a simple Map to store values to inject, identified by simple String keys.

Field Summary

Modifier and TypeField and Description
protected final Map<String, Object>
private static final long

Constructor Summary

AccessConstructor and Description
public
Std()

public
Std(Map<String, Object> values)

Method Summary

Modifier and TypeMethod and Description
public InjectableValues.Std
addValue(String key, Object value)

public InjectableValues.Std
addValue(Class<?> classKey, Object value)

public Object
findInjectableValue(DeserializationContext ctxt, Object valueId, BeanProperty forProperty, Object beanInstance, Boolean optional, Boolean useInput)

Implements abstract tools.jackson.databind.InjectableValues.findInjectableValue.

Method called to find value identified by id valueId to inject as value of specified property during deserialization, passing POJO instance in which value will be injected if it is available (will be available when injected via field or setter; not available when injected via constructor or factory method argument).

public InjectableValues.Std
snapshot()

Implements tools.jackson.core.util.Snapshottable.snapshot.

Method to call to get an instance that may not be modified through any other object, including `this`.

Field Detail

_valuesback to summary
protected final Map<String, Object> _values
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Stdback to summary
public Std()
Stdback to summary
public Std(Map<String, Object> values)

Method Detail

addValueback to summary
public InjectableValues.Std addValue(String key, Object value)
addValueback to summary
public InjectableValues.Std addValue(Class<?> classKey, Object value)
findInjectableValueback to summary
public Object findInjectableValue(DeserializationContext ctxt, Object valueId, BeanProperty forProperty, Object beanInstance, Boolean optional, Boolean useInput)

Implements abstract tools.jackson.databind.InjectableValues.findInjectableValue.

Doc from tools.jackson.databind.InjectableValues.findInjectableValue.

Method called to find value identified by id valueId to inject as value of specified property during deserialization, passing POJO instance in which value will be injected if it is available (will be available when injected via field or setter; not available when injected via constructor or factory method argument).

Annotations
@Override
snapshotback to summary
public InjectableValues.Std snapshot()

Implements tools.jackson.core.util.Snapshottable.snapshot.

Doc from tools.jackson.core.util.Snapshottable.snapshot.

Method to call to get an instance that may not be modified through any other object, including `this`. That instance may be `this` if (and only if) this instance is effectively immutable (unmodifiable) through its API: if this is not the case, a new copy with same configuration must be created and returned.

Annotations
@Override