Top Description Fields Constructors Methods
tools.jackson.databind.exc

public abstract Class PropertyBindingException

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

Base class for MismatchedInputExceptions that are specifically related to problems related to binding an individual property.

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 tools.jackson.databind.exc.MismatchedInputException:
_currentToken_targetType

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public Collection<Object>
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.

public String
messageSuffix()

Overrides tools.jackson.core.JacksonException.messageSuffix.

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

Inherited from tools.jackson.databind.exc.MismatchedInputException:
_currentTokenfromfromgetCurrentTokengetTargetTypesetCurrentTokensetTargetType

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, TokenStreamLocation loc, Class<?> referringClass, String propName, Collection<Object> propertyIds)

Method Detail

getKnownPropertyIdsback to summary
public Collection<Object> getKnownPropertyIds()
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.

messageSuffixback to summary
public String messageSuffix()

Overrides tools.jackson.core.JacksonException.messageSuffix.

Doc from tools.jackson.core.JacksonException.messageSuffix.

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

Note

In Jackson 2.x, accessor was getMessageSuffix(): in 3.0 changed to non-getter to indicate it is not a "regular" getter (although it would not be serialized anyway due to lower visibility).

Annotations
@Override