Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.exc

public abstract Class PropertyBindingException

extends MismatchedInputException
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException, com.fasterxml.jackson.databind.exc.IgnoredPropertyException
Annotations
@SuppressWarnings:serial
Imports
java.util.Collection, .Collections, .Iterator, com.fasterxml.jackson.core.JsonLocation, .JsonParser, com.fasterxml.jackson.databind.JsonMappingException

Base class for JsonMappingExceptions that are specifically related to problems related to binding an individual property.
Since
2.3

Field Summary

Modifier and TypeField and Description
protected transient String
_propertiesAsString

Lazily constructed description of known properties, used for constructing actual message if and as needed.

protected final Collection<Object>
_propertyIds

Set of ids of properties that are known for the type, if this can be statically determined.

protected final String
_propertyName

Note

redundant information since it is also included in the reference path.

protected final Class<?>
_referringClass

Class that does not contain mapping for the unrecognized property.

private static final int
MAX_DESC_LENGTH

Somewhat arbitrary limit, but let's try not to create uselessly huge error messages

Inherited from com.fasterxml.jackson.databind.exc.MismatchedInputException:
_targetType

Constructor Summary

AccessConstructor and Description
protected
PropertyBindingException(JsonParser p, String msg, JsonLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)

protected
PropertyBindingException(String msg, JsonLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)

Deprecated Since 2.7

Method Summary

Modifier and TypeMethod and Description
public Collection<Object>
public String
getMessageSuffix()

Overrides com.fasterxml.jackson.core.JsonProcessingException.getMessageSuffix.

Accessor that sub-classes can override to append additional information right after the main message, but before source location information.
public String
getPropertyName()

Convenience method for accessing logical property name that could not be mapped.

public Class<?>
getReferringClass()

Method for accessing type (class) that is missing definition to allow binding of the unrecognized property.

Inherited from com.fasterxml.jackson.databind.exc.MismatchedInputException:
fromfromfromgetTargetTypesetTargetType

Field Detail

_propertiesAsStringback to summary
protected transient String _propertiesAsString

Lazily constructed description of known properties, used for constructing actual message if and as needed.

_propertyIdsback to summary
protected final Collection<Object> _propertyIds

Set of ids of properties that are known for the type, if this can be statically determined.

_propertyNameback to summary
protected final String _propertyName

Note

redundant information since it is also included in the reference path.

_referringClassback to summary
protected final Class<?> _referringClass

Class that does not contain mapping for the unrecognized property.

MAX_DESC_LENGTHback to summary
private static final int MAX_DESC_LENGTH

Somewhat arbitrary limit, but let's try not to create uselessly huge error messages

Constructor Detail

PropertyBindingExceptionback to summary
protected PropertyBindingException(JsonParser p, String msg, JsonLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)
Since
2.7
PropertyBindingExceptionback to summary
protected PropertyBindingException(String msg, JsonLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)

Deprecated

Since 2.7

Annotations
@Deprecated

Method Detail

getKnownPropertyIdsback to summary
public Collection<Object> getKnownPropertyIds()
getMessageSuffixback to summary
public String getMessageSuffix()

Overrides com.fasterxml.jackson.core.JsonProcessingException.getMessageSuffix.

Doc from com.fasterxml.jackson.core.JsonProcessingException.getMessageSuffix.

Accessor that sub-classes can override to append additional information right after the main message, but before source location information.

Returns:String

Message suffix assigned, if any; null if none

Annotations
@Override
getPropertyNameback to summary
public String getPropertyName()

Convenience method for accessing logical property name that could not be mapped. Note that it is the last path reference in the underlying path.

getReferringClassback to summary
public Class<?> getReferringClass()

Method for accessing type (class) that is missing definition to allow binding of the unrecognized property.