Class JDKValueInstantiators.ConstantValueInstantiator
- java.lang.Object
-
- com.fasterxml.jackson.databind.deser.ValueInstantiator
-
- com.fasterxml.jackson.databind.deser.ValueInstantiator.Base
-
- com.fasterxml.jackson.databind.deser.impl.JDKValueInstantiators.ConstantValueInstantiator
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- JDKValueInstantiators
private static class JDKValueInstantiators.ConstantValueInstantiator extends ValueInstantiator.Base implements java.io.Serializable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.ValueInstantiator
ValueInstantiator.Base, ValueInstantiator.Gettable
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object
_value
private static long
serialVersionUID
-
Fields inherited from class com.fasterxml.jackson.databind.deser.ValueInstantiator.Base
_valueType
-
-
Constructor Summary
Constructors Constructor Description ConstantValueInstantiator(java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreateUsingDefault()
Method that can be called to check whether a default creator (constructor, or no-arg static factory method) is available for this instantiatorboolean
canInstantiate()
Method that will return true if any ofcanCreateXxx
method returns true: that is, if there is any way that an instance could be created.java.lang.Object
createUsingDefault(DeserializationContext ctxt)
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.-
Methods inherited from class com.fasterxml.jackson.databind.deser.ValueInstantiator.Base
getValueClass, getValueTypeDesc
-
Methods inherited from class com.fasterxml.jackson.databind.deser.ValueInstantiator
_createFromStringFallbacks, canCreateFromBoolean, canCreateFromDouble, canCreateFromInt, canCreateFromLong, canCreateFromObjectWith, canCreateFromString, canCreateUsingArrayDelegate, canCreateUsingDelegate, createFromBoolean, createFromDouble, createFromInt, createFromLong, createFromObjectWith, createFromObjectWith, createFromString, createUsingArrayDelegate, createUsingDelegate, getArrayDelegateCreator, getArrayDelegateType, getDefaultCreator, getDelegateCreator, getDelegateType, getFromObjectArguments, getIncompleteParameter, getWithArgsCreator
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_value
protected final java.lang.Object _value
-
-
Method Detail
-
canInstantiate
public boolean canInstantiate()
Description copied from class:ValueInstantiator
Method that will return true if any ofcanCreateXxx
method returns true: that is, if there is any way that an instance could be created.- Overrides:
canInstantiate
in classValueInstantiator
-
canCreateUsingDefault
public boolean canCreateUsingDefault()
Description copied from class:ValueInstantiator
Method that can be called to check whether a default creator (constructor, or no-arg static factory method) is available for this instantiator- Overrides:
canCreateUsingDefault
in classValueInstantiator
-
createUsingDefault
public java.lang.Object createUsingDefault(DeserializationContext ctxt) throws java.io.IOException
Description copied from class:ValueInstantiator
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
ValueInstantiator.getFromObjectArguments(com.fasterxml.jackson.databind.DeserializationConfig)
returns null or empty List.- Overrides:
createUsingDefault
in classValueInstantiator
- Throws:
java.io.IOException
-
-