Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.deser.impl

public Class NullsConstantProvider

extends Object
implements NullValueProvider, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, com.fasterxml.jackson.databind.deser.NullValueProvider
Imports
com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.deser.NullValueProvider, com.fasterxml.jackson.databind.util.AccessPattern

Simple NullValueProvider that will simply return given constant value when a null is encountered; or, with a specially constructed instance (see skipper, indicate the need for special behavior of skipping property altogether (not setting as anything OR throwing exception).

Field Summary

Modifier and TypeField and Description
protected final AccessPattern
protected final Object
private static final NullsConstantProvider
private static final long
private static final NullsConstantProvider

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static NullsConstantProvider
public AccessPattern
getNullAccessPattern()

Implements com.fasterxml.jackson.databind.deser.NullValueProvider.getNullAccessPattern.

Accessor that may be used to determine if and when provider must be called to access null replacement value.
public Object
getNullValue(DeserializationContext ctxt)

Implements com.fasterxml.jackson.databind.deser.NullValueProvider.getNullValue.

Method called to possibly convert incoming `null` token (read via underlying streaming input source) into other value of type accessor supports.
public static boolean
isNuller(NullValueProvider p)

Utility method that can be used to check if given null value provider is "nuller", no-operation provider that will always simply return Java `null` for any and all input `null`s.

public static boolean
isSkipper(NullValueProvider p)

Utility method that can be used to check if given null value provider is "skipper", marker provider that means that all input `null`s should be skipped (ignored), instead of converted

public static NullsConstantProvider
public static NullsConstantProvider
skipper()

Static accessor for a stateless instance used as marker, to indicate that all input `null` values should be skipped (ignored), so that no corresponding property value is set (with POJOs), and no content values (array/Collection elements, Map entries) are added.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_accessback to summary
protected final AccessPattern _access
_nullValueback to summary
protected final Object _nullValue
NULLERback to summary
private static final NullsConstantProvider NULLER
serialVersionUIDback to summary
private static final long serialVersionUID
SKIPPERback to summary
private static final NullsConstantProvider SKIPPER

Constructor Detail

NullsConstantProviderback to summary
protected NullsConstantProvider(Object nvl)

Method Detail

forValueback to summary
public static NullsConstantProvider forValue(Object nvl)
getNullAccessPatternback to summary
public AccessPattern getNullAccessPattern()

Implements com.fasterxml.jackson.databind.deser.NullValueProvider.getNullAccessPattern.

Doc from com.fasterxml.jackson.databind.deser.NullValueProvider.getNullAccessPattern.

Accessor that may be used to determine if and when provider must be called to access null replacement value.

Annotations
@Override
getNullValueback to summary
public Object getNullValue(DeserializationContext ctxt)

Implements com.fasterxml.jackson.databind.deser.NullValueProvider.getNullValue.

Doc from com.fasterxml.jackson.databind.deser.NullValueProvider.getNullValue.

Method called to possibly convert incoming `null` token (read via underlying streaming input source) into other value of type accessor supports. May return `null`, or value compatible with type binding.

Note

if getNullAccessPattern() returns `ALWAYS_NULL` or `CONSTANT`, this method WILL NOT use provided `ctxt` and it may thus be passed as `null`.

Annotations
@Override
isNullerback to summary
public static boolean isNuller(NullValueProvider p)

Utility method that can be used to check if given null value provider is "nuller", no-operation provider that will always simply return Java `null` for any and all input `null`s.

isSkipperback to summary
public static boolean isSkipper(NullValueProvider p)

Utility method that can be used to check if given null value provider is "skipper", marker provider that means that all input `null`s should be skipped (ignored), instead of converted

nullerback to summary
public static NullsConstantProvider nuller()
skipperback to summary
public static NullsConstantProvider skipper()

Static accessor for a stateless instance used as marker, to indicate that all input `null` values should be skipped (ignored), so that no corresponding property value is set (with POJOs), and no content values (array/Collection elements, Map entries) are added.