public class ConversionException extends RuntimeException
Constructor and Description |
---|
ConversionException(String message)
Construct exception with message.
|
ConversionException(String message,
Throwable cause)
Construct exception with message and cause.
|
ConversionException(Throwable cause)
Construct exception with cause.
|
Modifier and Type | Method and Description |
---|---|
IConverter<?> |
getConverter()
Gets the used converter.
|
Format |
getFormat()
Get the used format.
|
Locale |
getLocale()
Get the used locale.
|
String |
getResourceKey() |
Object |
getSourceValue()
Gets the tried value.
|
Class<?> |
getTargetType()
Gets the target property type.
|
Map<String,Object> |
getVariables()
Returns the map of variables for this exception.
|
ConversionException |
setConverter(IConverter<?> converter)
Sets the used converter.
|
ConversionException |
setFormat(Format format)
Sets the used format.
|
ConversionException |
setLocale(Locale locale)
Sets the used locale.
|
ConversionException |
setResourceKey(String resourceKey)
Set the resource key for the message that should be displayed.
|
ConversionException |
setSourceValue(Object sourceValue)
Sets the tried value.
|
ConversionException |
setTargetType(Class<?> targetType)
Sets the target property type.
|
ConversionException |
setVariable(String name,
Object value)
Sets a variable that will be used in substitution
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConversionException(String message)
message
- messagepublic ConversionException(String message, Throwable cause)
message
- messagecause
- causepublic ConversionException(Throwable cause)
cause
- causepublic final IConverter<?> getConverter()
public final Format getFormat()
public final Locale getLocale()
public final Object getSourceValue()
public final Class<?> getTargetType()
public final ConversionException setConverter(IConverter<?> converter)
converter
- the converter.public final ConversionException setFormat(Format format)
format
- the used format.public final ConversionException setLocale(Locale locale)
locale
- the used locale.public final ConversionException setSourceValue(Object sourceValue)
sourceValue
- the tried value.public final ConversionException setTargetType(Class<?> targetType)
targetType
- sets the target property typepublic String getResourceKey()
public ConversionException setResourceKey(String resourceKey)
resourceKey
- sets the resource keypublic ConversionException setVariable(String name, Object value)
name
- variable namevalue
- variable valueCopyright © 2006–2021 Apache Software Foundation. All rights reserved.