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 |
| Access | Constructor and Description |
|---|---|
| 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 tools. Method that can be called to check whether a BigDecimal based creator is available
to use (to call |
| public boolean | canCreateFromBigInteger()
Overrides tools. Method that can be called to check whether a BigInteger based creator is available
to use (to call |
| public boolean | canCreateFromBoolean()
Overrides tools. Method that can be called to check whether a double (boolean / Boolean) based
creator is available to use (to call |
| public boolean | canCreateFromDouble()
Overrides tools. Method that can be called to check whether a double (double / Double) based
creator is available to use (to call |
| public boolean | canCreateFromInt()
Overrides tools. Method that can be called to check whether an integer (int, Integer) based
creator is available to use (to call |
| public boolean | canCreateFromLong()
Overrides tools. Method that can be called to check whether a long (long, Long) based
creator is available to use (to call |
| public boolean | canCreateFromObjectWith()
Overrides tools. 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 tools. Method that can be called to check whether a String-based creator is available for this instantiator. |
| public boolean | canCreateUsingArrayDelegate()
Overrides tools. 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 tools. 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 tools. 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 tools. 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 ValueInstantiator | createContextual(DeserializationContext ctxt, BeanDescription.
Implements abstract tools. "Contextualization" method that is called after construction but before first use, to allow instantiator access to context needed to possible resolve its dependencies. |
| public Object | |
| public Object | |
| public Object | createFromBoolean(DeserializationContext ctxt, boolean value)
Overrides tools.
|
| public Object | createFromDouble(DeserializationContext ctxt, double value)
Overrides tools.
|
| public Object | createFromInt(DeserializationContext ctxt, int value)
Overrides tools.
|
| public Object | createFromLong(DeserializationContext ctxt, long value)
Overrides tools.
|
| public Object | createFromObjectWith(DeserializationContext ctxt, Object[] args)
Overrides tools. 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 tools. 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 tools. 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 tools. Combination of |
| public Object | createUsingDelegate(DeserializationContext ctxt, Object delegate)
Overrides tools. Method to called to create value instance from JSON Object using an intermediate "delegate" value to pass to createor method |
| public AnnotatedWithParams | getArrayDelegateCreator()
Overrides tools. 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 tools. 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 tools. 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 tools. 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 tools. 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 tools. Method called to determine types of instantiation arguments
to use when creating instances with creator arguments
(when |
| public Class | getValueClass()
Implements abstract tools. Accessor for raw (type-erased) type of instances to create. |
| public String | getValueTypeDesc()
Implements abstract tools. Method that returns description of the value type this instantiator handles. |
| public AnnotatedWithParams | getWithArgsCreator()
Overrides tools. 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 DatabindException | 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 DatabindException | wrapAsDatabindException(DeserializationContext ctxt, Throwable t)
Helper method that will return given |
| _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 | |
| 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 JacksonException | |
| canCreateFromBigDecimal | back to summary |
|---|---|
| public boolean canCreateFromBigDecimal() Overrides tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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) | |
| createContextual | back to summary |
|---|---|
| public ValueInstantiator createContextual(DeserializationContext ctxt, BeanDescription. Implements abstract tools. Doc from tools. "Contextualization" method that is called after construction but before first use, to allow instantiator access to context needed to possible resolve its dependencies.
| |
| createFromBigDecimal | back to summary |
|---|---|
| public Object createFromBigDecimal(DeserializationContext ctxt, BigDecimal value) throws JacksonException Overrides tools.
| |
| createFromBigInteger | back to summary |
|---|---|
| public Object createFromBigInteger(DeserializationContext ctxt, BigInteger value) throws JacksonException Overrides tools.
| |
| createFromBoolean | back to summary |
|---|---|
| public Object createFromBoolean(DeserializationContext ctxt, boolean value) throws JacksonException Overrides tools.
| |
| createFromDouble | back to summary |
|---|---|
| public Object createFromDouble(DeserializationContext ctxt, double value) throws JacksonException Overrides tools.
| |
| createFromInt | back to summary |
|---|---|
| public Object createFromInt(DeserializationContext ctxt, int value) throws JacksonException Overrides tools.
| |
| createFromLong | back to summary |
|---|---|
| public Object createFromLong(DeserializationContext ctxt, long value) throws JacksonException Overrides tools.
| |
| createFromObjectWith | back to summary |
|---|---|
| public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) throws JacksonException Overrides tools. Doc from tools. 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 JacksonException Overrides tools.
| |
| createUsingArrayDelegate | back to summary |
|---|---|
| public Object createUsingArrayDelegate(DeserializationContext ctxt, Object delegate) throws JacksonException Overrides tools. Doc from tools. 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 JacksonException Overrides tools. Doc from tools. 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 JacksonException Overrides tools. Doc from tools. Combination of
| |
| createUsingDelegate | back to summary |
|---|---|
| public Object createUsingDelegate(DeserializationContext ctxt, Object delegate) throws JacksonException Overrides tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 tools. Doc from tools. 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 Implements abstract tools. Doc from tools. Accessor for raw (type-erased) type of instances to create.
| |
| getValueTypeDesc | back to summary |
|---|---|
| public String getValueTypeDesc() Implements abstract tools. Doc from tools. Method that returns description of the value type this instantiator handles. Used for error messages, diagnostics.
| |
| getWithArgsCreator | back to summary |
|---|---|
| public AnnotatedWithParams getWithArgsCreator() Overrides tools. Doc from tools. 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 DatabindException 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) | |
| wrapAsDatabindException | back to summary |
|---|---|
| protected DatabindException wrapAsDatabindException(DeserializationContext ctxt, Throwable t) Helper method that will return given | |