Top Inners Fields Constructors Methods
tools.jackson.datatype.eclipsecollections.deser.pair

public final Class PairInstantiators

extends Base
Class Inheritance
Imports
java.util.*, java.util.function.BiFunction, .Function, tools.jackson.databind.*, tools.jackson.databind.deser.CreatorProperty, .SettableBeanProperty, .ValueInstantiator, .ValueInstantiators, tools.jackson.databind.introspect.AnnotationCollector, tools.jackson.databind.jsontype.TypeDeserializer, org.eclipse.collections.api.tuple.Pair, .Twin, org.eclipse.collections.impl.tuple.Tuples

Author
yawkat

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class

Field Summary

Modifier and TypeField and Description
private static final List<Class<?>>
private static final Map<Class<?>, Function<JavaType, ValueInstantiator>>
private static final Map<Class<?>, ValueInstantiator>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
add(Class<?> objectKeyOrValuePairClass, Function<JavaType, ValueInstantiator> lambda)

public ValueInstantiator
public static List<Class<?>>
pack-priv static <P> ValueInstantiator
objectPrimitiveInstantiator(JavaType inputType, Class<?> two, BiFunction<Object, Object, P> factory)

object->primitive

pack-priv static <P> ValueInstantiator
primitiveObjectInstantiator(JavaType inputType, Class<?> one, BiFunction<Object, Object, P> factory)

primitive->object

pack-priv static <P> void
purePrimitiveInstantiator(Class<P> pairClass, Class<?> one, Class<?> two, BiFunction<Object, Object, P> factory)

primitive->primitive

Field Detail

ALL_PAIR_CLASSESback to summary
private static final List<Class<?>> ALL_PAIR_CLASSES
KEY_OR_VALUE_OBJECT_LAMBDASback to summary
private static final Map<Class<?>, Function<JavaType, ValueInstantiator>> KEY_OR_VALUE_OBJECT_LAMBDAS
PURE_PRIMITIVE_INSTANTIATORSback to summary
private static final Map<Class<?>, ValueInstantiator> PURE_PRIMITIVE_INSTANTIATORS

Constructor Detail

PairInstantiatorsback to summary
public PairInstantiators()

Method Detail

addback to summary
pack-priv static void add(Class<?> objectKeyOrValuePairClass, Function<JavaType, ValueInstantiator> lambda)
Annotations
@SuppressWarnings:unused
findValueInstantiatorback to summary
public ValueInstantiator findValueInstantiator(DeserializationConfig config, BeanDescription.Supplier beanDescRef)

Overrides tools.jackson.databind.deser.ValueInstantiators.Base.findValueInstantiator.

Implements tools.jackson.databind.deser.ValueInstantiators.findValueInstantiator.

Doc from tools.jackson.databind.deser.ValueInstantiators.findValueInstantiator.

Method called to find the ValueInstantiator to use for creating instances of specified type during deserialization.

Note that unlike with 2.0, no default instantiator is passed at this point: there is a separate method, modifyValueInstantiator if you want to use or modify that.

Annotations
@Override
getAllPairClassesback to summary
public static List<Class<?>> getAllPairClasses()
objectPrimitiveInstantiatorback to summary
pack-priv static <P> ValueInstantiator objectPrimitiveInstantiator(JavaType inputType, Class<?> two, BiFunction<Object, Object, P> factory)

object->primitive

Annotations
@SuppressWarnings:unused
primitiveObjectInstantiatorback to summary
pack-priv static <P> ValueInstantiator primitiveObjectInstantiator(JavaType inputType, Class<?> one, BiFunction<Object, Object, P> factory)

primitive->object

Annotations
@SuppressWarnings:unused
purePrimitiveInstantiatorback to summary
pack-priv static <P> void purePrimitiveInstantiator(Class<P> pairClass, Class<?> one, Class<?> two, BiFunction<Object, Object, P> factory)

primitive->primitive

Annotations
@SuppressWarnings:unused
tools.jackson.datatype.eclipsecollections.deser.pair back to summary

pack-priv abstract Class PairInstantiators.PairInstantiator

extends Base
Class Inheritance

Field Summary

Inherited from tools.jackson.databind.deser.ValueInstantiator.Base:
_valueType

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
canCreateFromObjectWith()

Overrides tools.jackson.databind.deser.ValueInstantiator.canCreateFromObjectWith.

Method that can be called to check whether a property-based creator (argument-taking constructor or factory method) is available to instantiate values from JSON Object

public ValueInstantiator
createContextual(DeserializationContext ctxt, BeanDescription.Supplier beanDescRef)

Overrides tools.jackson.databind.deser.ValueInstantiator.Base.createContextual.

"Contextualization" method that is called after construction but before first use, to allow instantiator access to context needed to possible resolve its dependencies.

public final SettableBeanProperty[]
getFromObjectArguments(DeserializationConfig config)

Overrides tools.jackson.databind.deser.ValueInstantiator.getFromObjectArguments.

Method called to determine types of instantiation arguments to use when creating instances with creator arguments (when canCreateFromObjectWith() returns true).

pack-priv final SettableBeanProperty[]
pack-priv abstract JavaType
pack-priv abstract JavaType
Inherited from tools.jackson.databind.deser.ValueInstantiator.Base:
getValueClassgetValueTypeDesc

Constructor Detail

PairInstantiatorback to summary
public PairInstantiator(Class<?> type)
PairInstantiatorback to summary
public PairInstantiator(JavaType type)

Method Detail

canCreateFromObjectWithback to summary
public final boolean canCreateFromObjectWith()

Overrides tools.jackson.databind.deser.ValueInstantiator.canCreateFromObjectWith.

Doc from tools.jackson.databind.deser.ValueInstantiator.canCreateFromObjectWith.

Method that can be called to check whether a property-based creator (argument-taking constructor or factory method) is available to instantiate values from JSON Object

Annotations
@Override
createContextualback to summary
public ValueInstantiator createContextual(DeserializationContext ctxt, BeanDescription.Supplier beanDescRef)

Overrides tools.jackson.databind.deser.ValueInstantiator.Base.createContextual.

Doc from tools.jackson.databind.deser.ValueInstantiator.createContextual.

"Contextualization" method that is called after construction but before first use, to allow instantiator access to context needed to possible resolve its dependencies.

Annotations
@Override
getFromObjectArgumentsback to summary
public final SettableBeanProperty[] getFromObjectArguments(DeserializationConfig config)

Overrides tools.jackson.databind.deser.ValueInstantiator.getFromObjectArguments.

Doc from tools.jackson.databind.deser.ValueInstantiator.getFromObjectArguments.

Method called to determine types of instantiation arguments to use when creating instances with creator arguments (when canCreateFromObjectWith() returns true). These arguments are bound from JSON, using specified property types to locate deserializers.

Note

all properties will be of type tools.jackson.databind.deser.CreatorProperty.

Annotations
@Override
getFromObjectArgumentsback to summary
pack-priv final SettableBeanProperty[] getFromObjectArguments(DeserializationConfig config, TypeDeserializer typeDeserOne, TypeDeserializer typeDeserTwo)
oneTypeback to summary
pack-priv abstract JavaType oneType(DeserializationConfig config)
twoTypeback to summary
pack-priv abstract JavaType twoType(DeserializationConfig config)