ValueInstantiator implementation, which supports
Creator methods that can be indicated by standard Jackson
annotations.
| Modifier and Type | Field and Description |
|---|---|
| protected SettableBeanProperty[] | |
| protected AnnotatedWithParams | |
| protected JavaType | |
| protected SettableBeanProperty[] | |
| protected AnnotatedWithParams | _defaultCreator
Default (no-argument) constructor to use for instantiation
(with |
| protected SettableBeanProperty[] | |
| protected AnnotatedWithParams | |
| protected JavaType | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected AnnotatedWithParams | |
| protected final Class | |
| protected final String | _valueTypeDesc
Type of values that are instantiated; used for error reporting purposes. |
| protected AnnotatedWithParams | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | StdValueInstantiator(DeserializationConfig config, Class<?> valueType)
Deprecated
Since 2.7 use constructor that takes
JavaType instead
|
| public | |
| protected | StdValueInstantiator(StdValueInstantiator src)
Copy-constructor that sub-classes can use when creating new instances by fluent-style construction |
| Modifier and Type | Method and Description |
|---|---|
| private Object | _createUsingDelegate(AnnotatedWithParams delegateCreator, SettableBeanProperty[] delegateArguments, DeserializationContext ctxt, Object delegate)
|
| public boolean | canCreateFromBigDecimal()
Overrides com. Method that can be called to check whether a BigDecimal based creator is available
to use (to call |
| public boolean | canCreateFromBigInteger()
Overrides com. Method that can be called to check whether a BigInteger based creator is available
to use (to call |
| public boolean | canCreateFromBoolean()
Overrides com. Method that can be called to check whether a double (boolean / Boolean) based
creator is available to use (to call |
| public boolean | canCreateFromDouble()
Overrides com. Method that can be called to check whether a double (double / Double) based
creator is available to use (to call |
| public boolean | canCreateFromInt()
Overrides com. Method that can be called to check whether an integer (int, Integer) based
creator is available to use (to call |
| public boolean | canCreateFromLong()
Overrides com. Method that can be called to check whether a long (long, Long) based
creator is available to use (to call |
| public boolean | canCreateFromObjectWith()
Overrides com. 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 boolean | canCreateFromString()
Overrides com. Method that can be called to check whether a String-based creator is available for this instantiator. |
| public boolean | canCreateUsingArrayDelegate()
Overrides com. Method that can be called to check whether a array-delegate-based creator (single-arg constructor or factory method) is available for this instantiator |
| public boolean | canCreateUsingDefault()
Overrides com. Method that can be called to check whether a default creator (constructor, or no-arg static factory method) is available for this instantiator |
| public boolean | canCreateUsingDelegate()
Overrides com. Method that can be called to check whether a delegate-based creator (single-arg constructor or factory method) is available for this instantiator |
| public boolean | canInstantiate()
Overrides com. Method that will return true if any of |
| public void | configureFromArraySettings(AnnotatedWithParams arrayDelegateCreator, JavaType arrayDelegateType, SettableBeanProperty[] arrayDelegateArgs)
|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | configureFromObjectSettings(AnnotatedWithParams defaultCreator, AnnotatedWithParams delegateCreator, JavaType delegateType, SettableBeanProperty[] delegateArgs, AnnotatedWithParams withArgsCreator, SettableBeanProperty[] constructorArgs)
Method for setting properties related to instantiating values from JSON Object. |
| public void | |
| public Object | |
| public Object | |
| public Object | createFromBoolean(DeserializationContext ctxt, boolean value)
Overrides com.
|
| public Object | createFromDouble(DeserializationContext ctxt, double value)
Overrides com.
|
| public Object | createFromInt(DeserializationContext ctxt, int value)
Overrides com.
|
| public Object | createFromLong(DeserializationContext ctxt, long value)
Overrides com.
|
| public Object | createFromObjectWith(DeserializationContext ctxt, Object[] args)
Overrides com. 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. |
| public Object | |
| public Object | createUsingArrayDelegate(DeserializationContext ctxt, Object delegate)
Overrides com. Method to called to create value instance from JSON Array using an intermediate "delegate" value to pass to createor method |
| public Object | createUsingDefault(DeserializationContext ctxt)
Overrides com. Method called to create value instance from a JSON value when no data needs to passed to creator (constructor, factory method); typically this will call the default constructor of the value object. |
| public Object | createUsingDefaultOrWithoutArguments(DeserializationContext ctxt)
Overrides com. Combination of |
| public Object | createUsingDelegate(DeserializationContext ctxt, Object delegate)
Overrides com. Method to called to create value instance from JSON Object using an intermediate "delegate" value to pass to createor method |
| public AnnotatedWithParams | getArrayDelegateCreator()
Overrides com. Method that can be called to try to access member (constructor, static factory method) that is used as the "array delegate creator". |
| public JavaType | getArrayDelegateType(DeserializationConfig config)
Overrides com. Method that can be used to determine what is the type of array delegate type to use, if any; if no delegates are used, will return null. |
| public AnnotatedWithParams | getDefaultCreator()
Overrides com. Method that can be called to try to access member (constructor, static factory method) that is used as the "default creator" (creator that is called without arguments; typically default [zero-argument] constructor of the type). |
| public AnnotatedWithParams | getDelegateCreator()
Overrides com. Method that can be called to try to access member (constructor, static factory method) that is used as the "delegate creator". |
| public JavaType | getDelegateType(DeserializationConfig config)
Overrides com. Method that can be used to determine what is the type of delegate type to use, if any; if no delegates are used, will return null. |
| public SettableBeanProperty[] | getFromObjectArguments(DeserializationConfig config)
Overrides com. Method called to determine types of instantiation arguments
to use when creating instances with creator arguments
(when |
| public Class | getValueClass()
Overrides com. Accessor for raw (type-erased) type of instances to create. |
| public String | getValueTypeDesc()
Overrides com. Method that returns description of the value type this instantiator handles. |
| public AnnotatedWithParams | getWithArgsCreator()
Overrides com. Method that can be called to try to access member (constructor, static factory method) that is used as the "non-default creator" (constructor or factory method that takes one or more arguments). |
| protected JsonMappingException | rewrapCtorProblem(DeserializationContext ctxt, Throwable t)
Method that subclasses may call for standard handling of an exception thrown when calling constructor or factory method. |
| pack-priv static Double | |
| protected JsonMappingException | unwrapAndWrapException(DeserializationContext ctxt, Throwable t)
Deprecated
Since 2.7 call either
rewrapCtorProblem or
wrapAsJsonMappingException
|
| protected JsonMappingException | wrapAsJsonMappingException(DeserializationContext ctxt, Throwable t)
Helper method that will return given |
| protected JsonMappingException | wrapException(Throwable t)
Deprecated
Since 2.7 call either
rewrapCtorProblem or
wrapAsJsonMappingException
|
| _arrayDelegateArguments | back to summary |
|---|---|
| protected SettableBeanProperty[] _arrayDelegateArguments | |
| _arrayDelegateCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _arrayDelegateCreator | |
| _arrayDelegateType | back to summary |
|---|---|
| protected JavaType _arrayDelegateType | |
| _constructorArguments | back to summary |
|---|---|
| protected SettableBeanProperty[] _constructorArguments | |
| _defaultCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _defaultCreator Default (no-argument) constructor to use for instantiation
(with | |
| _delegateArguments | back to summary |
|---|---|
| protected SettableBeanProperty[] _delegateArguments | |
| _delegateCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _delegateCreator | |
| _delegateType | back to summary |
|---|---|
| protected JavaType _delegateType | |
| _fromBigDecimalCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromBigDecimalCreator | |
| _fromBigIntegerCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromBigIntegerCreator | |
| _fromBooleanCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromBooleanCreator | |
| _fromDoubleCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromDoubleCreator | |
| _fromIntCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromIntCreator | |
| _fromLongCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromLongCreator | |
| _fromStringCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _fromStringCreator | |
| _valueClass | back to summary |
|---|---|
protected final Class<?> _valueClass
| |
| _valueTypeDesc | back to summary |
|---|---|
| protected final String _valueTypeDesc Type of values that are instantiated; used for error reporting purposes. | |
| _withArgsCreator | back to summary |
|---|---|
| protected AnnotatedWithParams _withArgsCreator | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| StdValueInstantiator | back to summary |
|---|---|
| public StdValueInstantiator(DeserializationConfig config, Class<?> valueType)
Deprecated Since 2.7 use constructor that takes
| |
| StdValueInstantiator | back to summary |
|---|---|
| public StdValueInstantiator(DeserializationConfig config, JavaType valueType) | |
| StdValueInstantiator | back to summary |
|---|---|
| protected StdValueInstantiator(StdValueInstantiator src) Copy-constructor that sub-classes can use when creating new instances by fluent-style construction | |
| _createUsingDelegate | back to summary |
|---|---|
| private Object _createUsingDelegate(AnnotatedWithParams delegateCreator, SettableBeanProperty[] delegateArguments, DeserializationContext ctxt, Object delegate) throws IOException | |
| canCreateFromBigDecimal | back to summary |
|---|---|
| public boolean canCreateFromBigDecimal() Overrides com. Doc from com. Method that can be called to check whether a BigDecimal based creator is available
to use (to call
| |
| canCreateFromBigInteger | back to summary |
|---|---|
| public boolean canCreateFromBigInteger() Overrides com. Doc from com. Method that can be called to check whether a BigInteger based creator is available
to use (to call
| |
| canCreateFromBoolean | back to summary |
|---|---|
| public boolean canCreateFromBoolean() Overrides com. Doc from com. Method that can be called to check whether a double (boolean / Boolean) based
creator is available to use (to call
| |
| canCreateFromDouble | back to summary |
|---|---|
| public boolean canCreateFromDouble() Overrides com. Doc from com. Method that can be called to check whether a double (double / Double) based
creator is available to use (to call
| |
| canCreateFromInt | back to summary |
|---|---|
| public boolean canCreateFromInt() Overrides com. Doc from com. Method that can be called to check whether an integer (int, Integer) based
creator is available to use (to call
| |
| canCreateFromLong | back to summary |
|---|---|
| public boolean canCreateFromLong() Overrides com. Doc from com. Method that can be called to check whether a long (long, Long) based
creator is available to use (to call
| |
| canCreateFromObjectWith | back to summary |
|---|---|
| public boolean canCreateFromObjectWith() Overrides com. Doc from com. 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
| |
| canCreateFromString | back to summary |
|---|---|
| public boolean canCreateFromString() Overrides com. Doc from com. Method that can be called to check whether a String-based creator is available for this instantiator. Note does NOT include possible case of fallbacks, or coercion; only considers explicit creator.
| |
| canCreateUsingArrayDelegate | back to summary |
|---|---|
| public boolean canCreateUsingArrayDelegate() Overrides com. Doc from com. Method that can be called to check whether a array-delegate-based creator (single-arg constructor or factory method) is available for this instantiator
| |
| canCreateUsingDefault | back to summary |
|---|---|
| public boolean canCreateUsingDefault() Overrides com. Doc from com. Method that can be called to check whether a default creator (constructor, or no-arg static factory method) is available for this instantiator
| |
| canCreateUsingDelegate | back to summary |
|---|---|
| public boolean canCreateUsingDelegate() Overrides com. Doc from com. Method that can be called to check whether a delegate-based creator (single-arg constructor or factory method) is available for this instantiator
| |
| canInstantiate | back to summary |
|---|---|
| public boolean canInstantiate() Overrides com. Doc from com. Method that will return true if any of
| |
| configureFromArraySettings | back to summary |
|---|---|
| public void configureFromArraySettings(AnnotatedWithParams arrayDelegateCreator, JavaType arrayDelegateType, SettableBeanProperty[] arrayDelegateArgs) | |
| configureFromBigDecimalCreator | back to summary |
|---|---|
| public void configureFromBigDecimalCreator(AnnotatedWithParams creator) | |
| configureFromBigIntegerCreator | back to summary |
|---|---|
| public void configureFromBigIntegerCreator(AnnotatedWithParams creator) | |
| configureFromBooleanCreator | back to summary |
|---|---|
| public void configureFromBooleanCreator(AnnotatedWithParams creator) | |
| configureFromDoubleCreator | back to summary |
|---|---|
| public void configureFromDoubleCreator(AnnotatedWithParams creator) | |
| configureFromIntCreator | back to summary |
|---|---|
| public void configureFromIntCreator(AnnotatedWithParams creator) | |
| configureFromLongCreator | back to summary |
|---|---|
| public void configureFromLongCreator(AnnotatedWithParams creator) | |
| configureFromObjectSettings | back to summary |
|---|---|
| public void configureFromObjectSettings(AnnotatedWithParams defaultCreator, AnnotatedWithParams delegateCreator, JavaType delegateType, SettableBeanProperty[] delegateArgs, AnnotatedWithParams withArgsCreator, SettableBeanProperty[] constructorArgs) Method for setting properties related to instantiating values from JSON Object. We will choose basically only one approach (out of possible three), and clear other properties | |
| configureFromStringCreator | back to summary |
|---|---|
| public void configureFromStringCreator(AnnotatedWithParams creator) | |
| createFromBigDecimal | back to summary |
|---|---|
| public Object createFromBigDecimal(DeserializationContext ctxt, BigDecimal value) throws IOException Overrides com.
| |
| createFromBigInteger | back to summary |
|---|---|
| public Object createFromBigInteger(DeserializationContext ctxt, BigInteger value) throws IOException Overrides com.
| |
| createFromBoolean | back to summary |
|---|---|
| public Object createFromBoolean(DeserializationContext ctxt, boolean value) throws IOException Overrides com.
| |
| createFromDouble | back to summary |
|---|---|
| public Object createFromDouble(DeserializationContext ctxt, double value) throws IOException Overrides com.
| |
| createFromInt | back to summary |
|---|---|
| public Object createFromInt(DeserializationContext ctxt, int value) throws IOException Overrides com.
| |
| createFromLong | back to summary |
|---|---|
| public Object createFromLong(DeserializationContext ctxt, long value) throws IOException Overrides com.
| |
| createFromObjectWith | back to summary |
|---|---|
| public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) throws IOException Overrides com. Doc from com. 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.
This method is called if
| |
| createFromString | back to summary |
|---|---|
| public Object createFromString(DeserializationContext ctxt, String value) throws IOException Overrides com.
| |
| createUsingArrayDelegate | back to summary |
|---|---|
| public Object createUsingArrayDelegate(DeserializationContext ctxt, Object delegate) throws IOException Overrides com. Doc from com. Method to called to create value instance from JSON Array using an intermediate "delegate" value to pass to createor method
| |
| createUsingDefault | back to summary |
|---|---|
| public Object createUsingDefault(DeserializationContext ctxt) throws IOException Overrides com. Doc from com. Method called to create value instance from a JSON value when no data needs to passed to creator (constructor, factory method); typically this will call the default constructor of the value object. It will only be used if more specific creator methods are not applicable; hence "default".
This method is called if
| |
| createUsingDefaultOrWithoutArguments | back to summary |
|---|---|
| public Object createUsingDefaultOrWithoutArguments(DeserializationContext ctxt) throws IOException Overrides com. Doc from com. Combination of
| |
| createUsingDelegate | back to summary |
|---|---|
| public Object createUsingDelegate(DeserializationContext ctxt, Object delegate) throws IOException Overrides com. Doc from com. Method to called to create value instance from JSON Object using an intermediate "delegate" value to pass to createor method
| |
| getArrayDelegateCreator | back to summary |
|---|---|
| public AnnotatedWithParams getArrayDelegateCreator() Overrides com. Doc from com. Method that can be called to try to access member (constructor,
static factory method) that is used as the "array delegate creator".
Note that implementations not required to return actual object
they use (or, they may use some other instantiation) method.
That is, even if
| |
| getArrayDelegateType | back to summary |
|---|---|
| public JavaType getArrayDelegateType(DeserializationConfig config) Overrides com. Doc from com. Method that can be used to determine what is the type of array delegate type to use, if any; if no delegates are used, will return null. If non-null type is returned, deserializer will bind JSON into specified type (using standard deserializer for that type), and pass that to instantiator.
| |
| getDefaultCreator | back to summary |
|---|---|
| public AnnotatedWithParams getDefaultCreator() Overrides com. Doc from com. Method that can be called to try to access member (constructor,
static factory method) that is used as the "default creator"
(creator that is called without arguments; typically default
[zero-argument] constructor of the type).
Note that implementations not required to return actual object
they use (or, they may use some other instantiation) method.
That is, even if
| |
| getDelegateCreator | back to summary |
|---|---|
| public AnnotatedWithParams getDelegateCreator() Overrides com. Doc from com. Method that can be called to try to access member (constructor,
static factory method) that is used as the "delegate creator".
Note that implementations not required to return actual object
they use (or, they may use some other instantiation) method.
That is, even if
| |
| getDelegateType | back to summary |
|---|---|
| public JavaType getDelegateType(DeserializationConfig config) Overrides com. Doc from com. Method that can be used to determine what is the type of delegate type to use, if any; if no delegates are used, will return null. If non-null type is returned, deserializer will bind JSON into specified type (using standard deserializer for that type), and pass that to instantiator.
| |
| getFromObjectArguments | back to summary |
|---|---|
| public SettableBeanProperty[] getFromObjectArguments(DeserializationConfig config) Overrides com. Doc from com. Method called to determine types of instantiation arguments
to use when creating instances with creator arguments
(when Note all properties will be of type
| |
| getValueClass | back to summary |
|---|---|
| public Class Overrides com. Doc from com. Accessor for raw (type-erased) type of instances to create. Note since this method has not existed since beginning of
Jackson 2.0 series, default implementation will just return
| |
| getValueTypeDesc | back to summary |
|---|---|
| public String getValueTypeDesc() Overrides com. Doc from com. Method that returns description of the value type this instantiator handles. Used for error messages, diagnostics.
| |
| getWithArgsCreator | back to summary |
|---|---|
| public AnnotatedWithParams getWithArgsCreator() Overrides com. Doc from com. Method that can be called to try to access member (constructor,
static factory method) that is used as the "non-default creator"
(constructor or factory method that takes one or more arguments).
Note that implementations not required to return actual object
they use (or, they may use some other instantiation) method.
That is, even if
| |
| rewrapCtorProblem | back to summary |
|---|---|
| protected JsonMappingException rewrapCtorProblem(DeserializationContext ctxt, Throwable t) Method that subclasses may call for standard handling of an exception thrown when
calling constructor or factory method. Will unwrap
| |
| tryConvertToDouble | back to summary |
|---|---|
| pack-priv static Double tryConvertToDouble(BigDecimal value) | |
| unwrapAndWrapException | back to summary |
|---|---|
| protected JsonMappingException unwrapAndWrapException(DeserializationContext ctxt, Throwable t)
Deprecated Since 2.7 call either
| |
| wrapAsJsonMappingException | back to summary |
|---|---|
| protected JsonMappingException wrapAsJsonMappingException(DeserializationContext ctxt, Throwable t) Helper method that will return given
| |
| wrapException | back to summary |
|---|---|
| protected JsonMappingException wrapException(Throwable t)
Deprecated Since 2.7 call either
| |