public class NullsConstantProvider extends java.lang.Object implements NullValueProvider, java.io.Serializable
NullValueProvider
that will always throw a
InvalidNullException
when a null is encountered.Modifier and Type | Method and Description |
---|---|
static NullsConstantProvider |
forValue(java.lang.Object nvl) |
AccessPattern |
getNullAccessPattern()
Accessor that may be used to determine if and when provider must be called to
access null replacement value.
|
java.lang.Object |
getNullValue(DeserializationContext ctxt)
Method called to possibly convert incoming `null` token (read via
underlying streaming input source) into other value of type accessor
supports.
|
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.
|
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
|
static NullsConstantProvider |
nuller() |
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.
|
public static NullsConstantProvider skipper()
public static NullsConstantProvider nuller()
public static NullsConstantProvider forValue(java.lang.Object nvl)
public static boolean isSkipper(NullValueProvider p)
public static boolean isNuller(NullValueProvider p)
public AccessPattern getNullAccessPattern()
NullValueProvider
getNullAccessPattern
in interface NullValueProvider
public java.lang.Object getNullValue(DeserializationContext ctxt)
NullValueProvider
NOTE: if NullValueProvider.getNullAccessPattern()
returns `ALWAYS_NULL` or
`CONSTANT`, this method WILL NOT use provided `ctxt` and it may thus
be passed as `null`.
getNullValue
in interface NullValueProvider
Copyright © 2010 - 2020 Adobe. All Rights Reserved