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
Thrown when the type of an argument supplied to the
Formatter#format()
method of a Formatter
does not match the conversion character specified for it.
- Since:
- 1.5
- See Also:
- Serialized Form
Constructor Summary |
IllegalFormatConversionException(char c,
Class<?> arg)
Constructs a new IllegalFormatConversionException
which specifies that the argument of type arg does
not match the conversion character, c . |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
IllegalFormatConversionException
public IllegalFormatConversionException(char c,
Class<?> arg)
- Constructs a new
IllegalFormatConversionException
which specifies that the argument of type arg
does
not match the conversion character, c
.
- Parameters:
c
- the conversion character.arg
- the type which doesn't match the conversion character.
- Throws:
NullPointerException
- if arg
is null.
getConversion
public char getConversion()
- Returns the conversion character.
- Returns:
- the conversion character.
getArgumentClass
public Class<?> getArgumentClass()
- Returns the type of the mismatched argument.
- Returns:
- the type of the mismatched argument.