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). |