- 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
当对应于格式说明符的参数是不兼容的类型时抛出未检查的异常。除非另有说明,否则将
null参数传递给null中的任何方法或构造函数将导致抛出NullPointerException。- 从以下版本开始:
- 1.5
- 另请参见:
- Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 IllegalFormatConversionException(char c, Class<?> arg)使用不匹配的转换和相应的参数类构造此类的实例。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 Class<?>getArgumentClass()返回不匹配参数的类。chargetConversion()返回不适用的转换。StringgetMessage()返回此throwable的详细消息字符串。-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
构造方法详细信息
-
IllegalFormatConversionException
public IllegalFormatConversionException(char c, Class<?> arg)使用不匹配的转换和相应的参数类构造此类的实例。- 参数
-
c- 不适用转换 -
arg- 不匹配参数的类
-
-
方法详细信息
-
getConversion
public char getConversion()
返回不适用的转换。- 结果
- 不适用的转换
-
getArgumentClass
public Class<?> getArgumentClass()
返回不匹配参数的类。- 结果
- 不匹配的参数的类
-
getMessage
public String getMessage()
描述从类复制:Throwable返回此throwable的详细消息字符串。- 重写:
-
getMessage在Throwable - 结果
-
the detail message string of this
Throwableinstance (which may benull).
-
-