Most visited

Recently visited

Added in API level 1

TypeNotPresentException

public class TypeNotPresentException
extends RuntimeException

java.lang.Object
    java.lang.Throwable
      java.lang.Exception
        java.lang.RuntimeException
          java.lang.TypeNotPresentException


在应用程序尝试使用表示类型名称的字符串访问类型时引发,但未找到具有指定名称的类型的定义。 这个异常与ClassNotFoundException不同之处在于ClassNotFoundException是一个检查异常,而这个异常未被选中。

请注意,当未定义的类型变量被访问以及类型(例如,类,接口或注释类型)被加载时,这个异常可以被使用。 特别是,这个例外可以由API used to read annotations reflectively抛出。

也可以看看:

摘要(Summary)

Public constructors

TypeNotPresentException(String typeName, Throwable cause)

用指定的原因为指定类型构造一个 TypeNotPresentException

公共方法(Public methods)

String typeName()

返回不可用类型的完全限定名称。

继承方法(Inherited methods)

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

Public constructors

TypeNotPresentException

Added in API level 1
TypeNotPresentException (String typeName, 
                Throwable cause)

用指定的原因为指定类型构造一个 TypeNotPresentException

参数(Parameters)
typeName String: the fully qualified name of the unavailable type
cause Throwable: the exception that was thrown when the system attempted to load the named type, or null if unavailable or inapplicable

公共方法(Public methods)

typeName

Added in API level 1
String typeName ()

返回不可用类型的完全限定名称。

返回(Returns)
String the fully qualified name of the unavailable type

Hooray!