public class JsonLocationInstantiator extends ValueInstantiator
JsonLocation
, we should be able to just implement
ValueInstantiator
(not that explicit one would be very
hard but...)Constructor and Description |
---|
JsonLocationInstantiator() |
Modifier and Type | Method and Description |
---|---|
private static int |
_int(java.lang.Object o) |
private static long |
_long(java.lang.Object o) |
boolean |
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
|
java.lang.Object |
createFromObjectWith(DeserializationContext ctxt,
java.lang.Object[] args)
Method called to create value instance from JSON Object when
instantiation arguments are passed; this is done, for example when passing information
specified with "Creator" annotations.
|
private static CreatorProperty |
creatorProp(java.lang.String name,
JavaType type,
int index) |
SettableBeanProperty[] |
getFromObjectArguments(DeserializationConfig config)
Method called to determine types of instantiation arguments
to use when creating instances with creator arguments
(when
ValueInstantiator.canCreateFromObjectWith() returns true). |
java.lang.String |
getValueTypeDesc()
Method that returns description of the value type this instantiator
handles.
|
_createFromStringFallbacks, canCreateFromBoolean, canCreateFromDouble, canCreateFromInt, canCreateFromLong, canCreateFromString, canCreateUsingArrayDelegate, canCreateUsingDefault, canCreateUsingDelegate, canInstantiate, createFromBoolean, createFromDouble, createFromInt, createFromLong, createFromString, createUsingArrayDelegate, createUsingDefault, createUsingDelegate, getArrayDelegateCreator, getArrayDelegateType, getDefaultCreator, getDelegateCreator, getDelegateType, getIncompleteParameter, getWithArgsCreator
public java.lang.String getValueTypeDesc()
ValueInstantiator
getValueTypeDesc
in class ValueInstantiator
public boolean canCreateFromObjectWith()
ValueInstantiator
canCreateFromObjectWith
in class ValueInstantiator
public SettableBeanProperty[] getFromObjectArguments(DeserializationConfig config)
ValueInstantiator
ValueInstantiator.canCreateFromObjectWith()
returns true).
These arguments are bound from JSON, using specified
property types to locate deserializers.
NOTE: all properties will be of type
CreatorProperty
.
getFromObjectArguments
in class ValueInstantiator
private static CreatorProperty creatorProp(java.lang.String name, JavaType type, int index)
public java.lang.Object createFromObjectWith(DeserializationContext ctxt, java.lang.Object[] args)
ValueInstantiator
This method is called if ValueInstantiator.getFromObjectArguments(com.fasterxml.jackson.databind.DeserializationConfig)
returns
a non-empty List of arguments.
createFromObjectWith
in class ValueInstantiator
private static final long _long(java.lang.Object o)
private static final int _int(java.lang.Object o)