Top Description Fields Constructors Methods
com.fasterxml.jackson.module.afterburner.deser

public abstract Class OptimizedValueInstantiator

extends StdValueInstantiator
Class Inheritance
Imports
java.io.IOException, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.deser.std.StdValueInstantiator, com.fasterxml.jackson.databind.type.TypeFactory

Base class for concrete bytecode-generated value instantiators.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.deser.std.StdValueInstantiator:
_arrayDelegateArguments_arrayDelegateCreator_arrayDelegateType_constructorArguments_defaultCreator_delegateArguments_delegateCreator_delegateType_fromBigDecimalCreator_fromBigIntegerCreator_fromBooleanCreator_fromDoubleCreator_fromIntCreator_fromLongCreator_fromStringCreator_valueClass_valueTypeDesc_withArgsCreator

Constructor Summary

AccessConstructor and Description
protected
OptimizedValueInstantiator()

Default constructor which is only used when creating dummy instance to call factory method.

protected
OptimizedValueInstantiator(StdValueInstantiator src)

Copy-constructor to use for creating actual optimized instances.

Method Summary

Modifier and TypeMethod and Description
protected Object
_handleInstantiationProblem(DeserializationContext ctxt, Exception e)

Helper method needed to allow handling of instantiation exception in case of optimized no-args creator.

public boolean
canCreateUsingDefault()

Overrides com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.canCreateUsingDefault.

Need to override this, now that we have installed default creator.

public abstract Object
createUsingDefault(DeserializationContext ctxt)

Overrides com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDefault.

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.

protected abstract OptimizedValueInstantiator
Inherited from com.fasterxml.jackson.databind.deser.std.StdValueInstantiator:
canCreateFromBigDecimalcanCreateFromBigIntegercanCreateFromBooleancanCreateFromDoublecanCreateFromIntcanCreateFromLongcanCreateFromObjectWithcanCreateFromStringcanCreateUsingArrayDelegatecanCreateUsingDelegatecanInstantiateconfigureFromArraySettingsconfigureFromBigDecimalCreatorconfigureFromBigIntegerCreatorconfigureFromBooleanCreatorconfigureFromDoubleCreatorconfigureFromIntCreatorconfigureFromLongCreatorconfigureFromObjectSettingsconfigureFromStringCreatorcreateFromBigDecimalcreateFromBigIntegercreateFromBooleancreateFromDoublecreateFromIntcreateFromLongcreateFromObjectWithcreateFromStringcreateUsingArrayDelegatecreateUsingDefaultOrWithoutArgumentscreateUsingDelegategetArrayDelegateCreatorgetArrayDelegateTypegetDefaultCreatorgetDelegateCreatorgetDelegateTypegetFromObjectArgumentsgetValueClassgetValueTypeDescgetWithArgsCreatorrewrapCtorProblemunwrapAndWrapExceptionwrapAsJsonMappingExceptionwrapException

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.serialVersionUID.

Constructor Detail

OptimizedValueInstantiatorback to summary
protected OptimizedValueInstantiator()

Default constructor which is only used when creating dummy instance to call factory method.

OptimizedValueInstantiatorback to summary
protected OptimizedValueInstantiator(StdValueInstantiator src)

Copy-constructor to use for creating actual optimized instances.

Method Detail

_handleInstantiationProblemback to summary
protected Object _handleInstantiationProblem(DeserializationContext ctxt, Exception e) throws IOException

Helper method needed to allow handling of instantiation exception in case of optimized no-args creator.

Since
2.9
canCreateUsingDefaultback to summary
public boolean canCreateUsingDefault()

Overrides com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.canCreateUsingDefault.

Need to override this, now that we have installed default creator.

Annotations
@Override
createUsingDefaultback to summary
public abstract Object createUsingDefault(DeserializationContext ctxt) throws IOException

Overrides com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDefault.

Doc from com.fasterxml.jackson.databind.deser.ValueInstantiator.createUsingDefault.

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 getFromObjectArguments returns null or empty List.

Annotations
@Override
withback to summary
protected abstract OptimizedValueInstantiator with(StdValueInstantiator src)