Most visited

Recently visited

Added in API level 1

IllegalFormatConversionException

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

摘要(Summary)

Public constructors

IllegalFormatConversionException(char c, Class<?> arg)

使用不匹配的转换和相应的参数类构造此类的一个实例。

公共方法(Public methods)

Class<?> getArgumentClass()

返回不匹配参数的类。

char getConversion()

返回不适用的转换。

String getMessage()

返回此throwable的详细消息字符串。

继承方法(Inherited methods)

From class java.lang.Throwable
From class java.lang.Object

Public constructors

IllegalFormatConversionException

Added in API level 1
IllegalFormatConversionException (char c, 
                Class<?> arg)

使用不匹配的转换和相应的参数类构造此类的一个实例。

参数(Parameters)
c char: Inapplicable conversion
arg Class: Class of the mismatched argument

公共方法(Public methods)

getArgumentClass

Added in API level 1
Class<?> getArgumentClass ()

返回不匹配参数的类。

返回(Returns)
Class<?> The class of the mismatched argument

getConversion

Added in API level 1
char getConversion ()

返回不适用的转换。

返回(Returns)
char The inapplicable conversion

getMessage

Added in API level 1
String getMessage ()

返回此throwable的详细消息字符串。

返回(Returns)
String the detail message string of this Throwable instance (which may be null).

Hooray!