public class TypeMismatchException extends PropertyAccessException
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR_CODE
Error code that a type mismatch error will be registered with.
|
private java.lang.Class |
requiredType |
private java.lang.Object |
value |
| Constructor and Description |
|---|
TypeMismatchException(java.lang.Object value,
java.lang.Class requiredType)
Create a new TypeMismatchException without PropertyChangeEvent.
|
TypeMismatchException(java.lang.Object value,
java.lang.Class requiredType,
java.lang.Throwable cause)
Create a new TypeMismatchException without PropertyChangeEvent.
|
TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
java.lang.Class requiredType)
Create a new TypeMismatchException.
|
TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
java.lang.Class requiredType,
java.lang.Throwable cause)
Create a new TypeMismatchException.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorCode()
Return the error code associated with this failure.
|
java.lang.Class |
getRequiredType()
Return the required target type, if any.
|
java.lang.Object |
getValue()
Return the offending value (may be
null) |
getPropertyChangeEvent, getPropertyNameequals, hashCodecontains, getMessage, getMostSpecificCause, getRootCausepublic static final java.lang.String ERROR_CODE
private transient java.lang.Object value
private java.lang.Class requiredType
public TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
java.lang.Class requiredType)
propertyChangeEvent - the PropertyChangeEvent that resulted in the problemrequiredType - the required target typepublic TypeMismatchException(java.beans.PropertyChangeEvent propertyChangeEvent,
java.lang.Class requiredType,
java.lang.Throwable cause)
propertyChangeEvent - the PropertyChangeEvent that resulted in the problemrequiredType - the required target type (or null if not known)cause - the root cause (may be null)public TypeMismatchException(java.lang.Object value,
java.lang.Class requiredType)
value - the offending value that couldn't be converted (may be null)requiredType - the required target type (or null if not known)public TypeMismatchException(java.lang.Object value,
java.lang.Class requiredType,
java.lang.Throwable cause)
value - the offending value that couldn't be converted (may be null)requiredType - the required target type (or null if not known)cause - the root cause (may be null)public java.lang.Object getValue()
null)getValue in class PropertyAccessExceptionpublic java.lang.Class getRequiredType()
public java.lang.String getErrorCode()
ErrorCodednull if not error-coded