public class NullsFailProvider extends Object implements NullValueProvider, Serializable
NullValueProvider
that will always throw a
InvalidNullException
when a null is encountered.Modifier and Type | Field and Description |
---|---|
protected PropertyName |
_name |
protected JavaType |
_type |
Modifier | Constructor and Description |
---|---|
protected |
NullsFailProvider(PropertyName name,
JavaType type) |
Modifier and Type | Method and Description |
---|---|
static NullsFailProvider |
constructForProperty(BeanProperty prop) |
static NullsFailProvider |
constructForProperty(BeanProperty prop,
JavaType type) |
static NullsFailProvider |
constructForRootValue(JavaType t) |
AccessPattern |
getNullAccessPattern()
Accessor that may be used to determine if and when provider must be called to
access null replacement value.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAbsentValue
protected final PropertyName _name
protected final JavaType _type
protected NullsFailProvider(PropertyName name, JavaType type)
public static NullsFailProvider constructForProperty(BeanProperty prop)
public static NullsFailProvider constructForProperty(BeanProperty prop, JavaType type)
public static NullsFailProvider constructForRootValue(JavaType t)
public AccessPattern getNullAccessPattern()
NullValueProvider
getNullAccessPattern
in interface NullValueProvider
public Object getNullValue(DeserializationContext ctxt) throws JsonMappingException
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
JsonMappingException
Copyright © 2008–2024 FasterXML. All rights reserved.