Package java.util
Class IllegalFormatConversionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- java.util.IllegalFormatException
-
- java.util.IllegalFormatConversionException
-
- All Implemented Interfaces:
Serializable
public class IllegalFormatConversionException extends IllegalFormatException implements Serializable
AnIllegalFormatConversionExceptionwill be thrown when the parameter is incompatible with the corresponding format specifier.- Since:
- 1.5
- See Also:
RuntimeException, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IllegalFormatConversionException(char c, Class<?> arg)Constructs a newIllegalFormatConversionExceptionwith the class of the mismatched conversion and corresponding parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>getArgumentClass()Returns the class of the mismatched parameter.chargetConversion()Returns the incompatible conversion.StringgetMessage()Returns the detail message which was provided when thisThrowablewas created.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
IllegalFormatConversionException
public IllegalFormatConversionException(char c, Class<?> arg)Constructs a newIllegalFormatConversionExceptionwith the class of the mismatched conversion and corresponding parameter.- Parameters:
c- the class of the mismatched conversion.arg- the corresponding parameter.
-
-
Method Detail
-
getArgumentClass
public Class<?> getArgumentClass()
Returns the class of the mismatched parameter.- Returns:
- the class of the mismatched parameter.
-
getConversion
public char getConversion()
Returns the incompatible conversion.- Returns:
- the incompatible conversion.
-
getMessage
public String getMessage()
Description copied from class:ThrowableReturns the detail message which was provided when thisThrowablewas created. Returnsnullif no message was provided at creation time.- Overrides:
getMessagein classThrowable
-
-