java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.klojang.convert.TypeConversionException
- All Implemented Interfaces:
Serializable
Indicates that a value could not be converted to the desired type.
- Author:
- Ayco Holleman
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTypeConversionException(Object inputValue, Class<?> targetType, String msg, Object... msgArgs) Creates a newTypeConversionExceptionfor the specified input value and target type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value for which the type conversion failed.Class<?> Returns the target type of the type conversion.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TypeConversionException
public TypeConversionException(Object inputValue, Class<?> targetType, String msg, Object... msgArgs) Creates a newTypeConversionExceptionfor the specified input value and target type.- Parameters:
inputValue- the input value (may benull, indicating thatnullcould not be converted to the target type)targetType- the target typemsg- a custom message orString.formatmessage patternmsgArgs- zero or more message arguments
-
-
Method Details
-
getInputValue
Returns the value for which the type conversion failed.- Returns:
- the value for which the type conversion failed
-
getTargetType
Returns the target type of the type conversion.- Returns:
- the target type of the type conversion
-