public class TypeMismatchException extends PropertyAccessException
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_CODE
Error code that a type mismatch error will be registered with.
|
Constructor and Description |
---|
TypeMismatchException(Object value,
Class<?> requiredType)
Create a new TypeMismatchException without PropertyChangeEvent.
|
TypeMismatchException(Object value,
Class<?> requiredType,
Throwable cause)
Create a new TypeMismatchException without PropertyChangeEvent.
|
TypeMismatchException(PropertyChangeEvent propertyChangeEvent,
Class<?> requiredType)
Create a new TypeMismatchException.
|
TypeMismatchException(PropertyChangeEvent propertyChangeEvent,
Class<?> requiredType,
Throwable cause)
Create a new TypeMismatchException.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Return the error code associated with this failure.
|
Class<?> |
getRequiredType()
Return the required target type, if any.
|
Object |
getValue()
Return the offending value (may be
null ) |
getPropertyChangeEvent, getPropertyName
equals, hashCode
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String ERROR_CODE
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> requiredType)
propertyChangeEvent
- the PropertyChangeEvent that resulted in the problemrequiredType
- the required target typepublic TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> requiredType, 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(Object value, 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(Object value, Class<?> requiredType, 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 Object getValue()
null
)getValue
in class PropertyAccessException
public Class<?> getRequiredType()
public String getErrorCode()
ErrorCoded
null
if not error-coded