public class IllegalFormatConversionException
extends IllegalFormatException
| java.lang.Object | ||||||
| java.lang.Throwable | ||||||
| java.lang.Exception | ||||||
| java.lang.RuntimeException | ||||||
| java.lang.IllegalArgumentException | ||||||
| java.util.IllegalFormatException | ||||||
| java.util.IllegalFormatConversionException | ||||||
当对应于格式说明符的参数属于不兼容类型时,抛出未经检查的异常。
除非另有说明,否则将 null参数传递给 此类中的任何方法或构造函数将导致抛出 NullPointerException 。
Public constructors |
|
|---|---|
IllegalFormatConversionException(char c, Class<?> arg) 使用不匹配的转换和相应的参数类构造此类的一个实例。 |
|
公共方法(Public methods) |
|
|---|---|
Class<?> |
getArgumentClass() 返回不匹配参数的类。 |
char |
getConversion() 返回不适用的转换。 |
String |
getMessage() 返回此throwable的详细消息字符串。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
IllegalFormatConversionException (char c,
Class<?> arg)
使用不匹配的转换和相应的参数类构造此类的一个实例。
| 参数(Parameters) | |
|---|---|
c |
char: Inapplicable conversion |
arg |
Class: Class of the mismatched argument |
Class<?> getArgumentClass ()
返回不匹配参数的类。
| 返回(Returns) | |
|---|---|
Class<?> |
The class of the mismatched argument |
char getConversion ()
返回不适用的转换。
| 返回(Returns) | |
|---|---|
char |
The inapplicable conversion |
String getMessage ()
返回此throwable的详细消息字符串。
| 返回(Returns) | |
|---|---|
String |
the detail message string of this Throwable instance (which may be null). |