java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.wicket.util.convert.ConversionException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
StringValueConversionException
Thrown for conversion exceptions.
- Author:
- Eelco Hillenius
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConversionException(String message) Construct exception with message.ConversionException(String message, Throwable cause) Construct exception with message and cause.ConversionException(Throwable cause) Construct exception with cause. -
Method Summary
Modifier and TypeMethodDescriptionfinal IConverter<?>Gets the used converter.final FormatGet the used format.final LocaleGet the used locale.final ObjectGets the tried value.final Class<?>Gets the target property type.Returns the map of variables for this exception.final ConversionExceptionsetConverter(IConverter<?> converter) Sets the used converter.final ConversionExceptionSets the used format.final ConversionExceptionSets the used locale.setResourceKey(String resourceKey) Set the resource key for the message that should be displayed.final ConversionExceptionsetSourceValue(Object sourceValue) Sets the tried value.final ConversionExceptionsetTargetType(Class<?> targetType) Sets the target property type.setVariable(String name, Object value) Sets a variable that will be used in substitutionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ConversionException
Construct exception with message.- Parameters:
message- message
-
ConversionException
Construct exception with message and cause.- Parameters:
message- messagecause- cause
-
ConversionException
Construct exception with cause.- Parameters:
cause- cause
-
-
Method Details
-
getConverter
Gets the used converter.- Returns:
- the used converter.
-
getFormat
Get the used format.- Returns:
- the used format
-
getLocale
Get the used locale.- Returns:
- the used locale
-
getSourceValue
Gets the tried value.- Returns:
- the tried value.
-
getTargetType
Gets the target property type.- Returns:
- the target property type.
-
setConverter
Sets the used converter.- Parameters:
converter- the converter.- Returns:
- This
-
setFormat
Sets the used format.- Parameters:
format- the used format.- Returns:
- This
-
setLocale
Sets the used locale.- Parameters:
locale- the used locale.- Returns:
- This
-
setSourceValue
Sets the tried value.- Parameters:
sourceValue- the tried value.- Returns:
- This
-
setTargetType
Sets the target property type.- Parameters:
targetType- sets the target property type- Returns:
- This
-
getResourceKey
- Returns:
- The resource key for the message that should be displayed
-
setResourceKey
Set the resource key for the message that should be displayed.- Parameters:
resourceKey- sets the resource key- Returns:
- This
-
setVariable
Sets a variable that will be used in substitution- Parameters:
name- variable namevalue- variable value- Returns:
- this for chaining
-
getVariables
Returns the map of variables for this exception.- Returns:
- map of variables for this exception (or null if no variables were defined)
-