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 (see _referringClass, if ids can be statically determined.

protected final String
_propertyName

Name of property that has the problem being reported.

protected final Class<?>
_referringClass

Class that has the problem with mapping of a property (unrecognized, missing, etc).

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 (see _propertyName).

public Class<?>
getReferringClass()

Method for accessing type (class) that has the problematic 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 (see _referringClass, if ids can be statically determined.

_propertyNameback to summary
protected final String _propertyName

Name of property that has the problem being reported.

Note

possibly redundant information since it may also included in the reference path.

_referringClassback to summary
protected final Class<?> _referringClass

Class that has the problem with mapping of a property (unrecognized, missing, etc).

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 (see _propertyName). Note that it is likely the last path reference in the underlying path (but not necessarily, depending on the type of problem).

getReferringClassback to summary
public Class<?> getReferringClass()

Method for accessing type (class) that has the problematic property.