java.util
Class IllegalFormatConversionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by java.util.IllegalFormatException
                      extended by 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.
 
Method Summary
 Class<?> getArgumentClass()
          Returns the type of the mismatched argument.
 char getConversion()
          Returns the conversion character.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.