- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.ReflectiveOperationException
-
- All Implemented Interfaces:
-
Serializable
- 已知直接子类:
-
ClassNotFoundException,IllegalAccessException,InstantiationException,InvocationTargetException,NoSuchFieldException,NoSuchMethodException
public class ReflectiveOperationException extends 异常
核心反射中的反射操作抛出的异常的常见超类。- 从以下版本开始:
- 1.7
- 另请参见:
-
LinkageError, Serialized Form
-
-
构造方法摘要
构造方法 Constructor 描述 ReflectiveOperationException()构造一个新的异常,以null作为其详细信息。ReflectiveOperationException(String message)使用指定的详细消息构造新的异常。ReflectiveOperationException(String message, Throwable cause)构造一个新的异常与指定的详细信息和原因。ReflectiveOperationException(Throwable cause)构造一个具有指定原因的新异常和一个详细信息(cause==null ? null : cause.toString())(通常包含类和详细信息cause)。
-
方法摘要
-
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, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
构造方法详细信息
-
ReflectiveOperationException
public ReflectiveOperationException()
构造一个新的异常,以null作为其详细信息。 原因未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)进行初始化。
-
ReflectiveOperationException
public ReflectiveOperationException(String message)
使用指定的详细消息构造新的异常。 原因未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)进行初始化。- 参数
-
message- 详细信息。 保存详细信息,以便稍后通过Throwable.getMessage()检索。
-
ReflectiveOperationException
public ReflectiveOperationException(String message, Throwable cause)
构造一个新的异常与指定的详细信息和原因。请注意,与
cause相关联的详细信息不会自动并入此异常的详细消息。- 参数
-
message- 详细信息(保存以供Throwable.getMessage()方法稍后检索)。 -
cause- 原因(由Throwable.getCause()方法保存供以后检索)。 (Anull值为null,表示原因不存在或未知。)
-
ReflectiveOperationException
public ReflectiveOperationException(Throwable cause)
构造具有指定原因的新异常和详细信息(cause==null ? null : cause.toString())(通常包含类别和详细信息cause)。- 参数
-
cause- 原因(由Throwable.getCause()方法保存供以后检索)。 (Anull值是允许的,表示原因不存在或未知。)
-
-