Top Description Fields Constructors Methods
java.util

public non-sealed Class IllegalFormatConversionException

extends IllegalFormatException
Class Inheritance

Unchecked exception thrown when the argument corresponding to the format specifier is of an incompatible type.

Unless otherwise specified, passing a null argument to any method or constructor in this class will cause a NullPointerException to be thrown.

Since
1.5

Field Summary

Modifier and TypeField and Description
private Class<?>
private char
c

private static final long

Constructor Summary

AccessConstructor and Description
public
IllegalFormatConversionException(char
Inapplicable conversion
c
,
Class<?>
Class of the mismatched argument
arg
)

Constructs an instance of this class with the mismatched conversion and the corresponding argument class.

Method Summary

Modifier and TypeMethod and Description
public Class<?>

Returns:

The class of the mismatched argument
getArgumentClass
()

Returns the class of the mismatched argument.

public char

Returns:

The inapplicable conversion
getConversion
()

Returns the inapplicable conversion.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Field Detail

argback to summary
private Class<?> arg
cback to summary
private char c
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.IllegalFormatException.serialVersionUID.

Annotations
@Serial

Constructor Detail

IllegalFormatConversionExceptionback to summary
public IllegalFormatConversionException(char c, Class<?> arg)

Constructs an instance of this class with the mismatched conversion and the corresponding argument class.

Parameters
c:char

Inapplicable conversion

arg:Class<?>

Class of the mismatched argument

Method Detail

getArgumentClassback to summary
public Class<?> getArgumentClass()

Returns the class of the mismatched argument.

Returns:Class<?>

The class of the mismatched argument

getConversionback to summary
public char getConversion()

Returns the inapplicable conversion.

Returns:char

The inapplicable conversion

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).