java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalStateException
- 所有已实现的接口:
Serializable
- 已知子类:
AcceptPendingException,AlreadyBoundException,AlreadyConnectedException,CancellationException,CancelledKeyException,ClosedDirectoryStreamException,ClosedFileSystemException,ClosedSelectorException,ClosedWatchServiceException,ConnectionPendingException,FormatterClosedException,IllegalBlockingModeException,IllegalComponentStateException,IllegalReceiveException,IllegalUnbindException,InvalidDnDOperationException,InvalidMarkException,NoConnectionPendingException,NonReadableChannelException,NonWritableChannelException,NotYetBoundException,NotYetConnectedException,OverlappingFileLockException,ReadPendingException,ShutdownChannelGroupException,WritePendingException
表示在非法或不适当的时间调用了方法。换句话说,Java 环境或 Java 应用程序未处于适合请求操作的状态。
- 自从:
- 1.1
- 参见:
-
构造方法总结
构造方法构造方法描述构造一个没有详细消息的 IllegalStateException。构造带有指定详细消息的 IllegalStateException。IllegalStateException(String message, Throwable cause) 构造具有指定详细消息和原因的新异常。IllegalStateException(Throwable cause) 构造一个具有指定原因和(cause==null ? null : cause.toString())详细消息(通常包含cause的类和详细消息)的新异常。 -
方法总结
在类 java.lang.Throwable 中声明的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
构造方法详细信息
-
IllegalStateException
public IllegalStateException()构造一个没有详细消息的 IllegalStateException。详细消息是描述此特定异常的字符串。 -
IllegalStateException
构造带有指定详细消息的 IllegalStateException。详细消息是描述此特定异常的字符串。- 参数:
s- 包含详细消息的字符串
-
IllegalStateException
构造具有指定详细消息和原因的新异常。请注意,与
cause关联的详细消息是not自动并入此异常的详细消息中。- 参数:
message- 详细消息(保存以供以后通过Throwable.getMessage()方法检索)。cause- 原因(保存以供以后通过Throwable.getCause()方法检索)。 (允许使用null值,表示原因不存在或未知。)- 自从:
- 1.5
-
IllegalStateException
构造一个具有指定原因和(cause==null ? null : cause.toString())详细消息(通常包含cause的类和详细消息)的新异常。此构造函数对于仅比其他可抛出对象(例如PrivilegedActionException)的包装器更多的异常很有用。- 参数:
cause- 原因(保存以供以后通过Throwable.getCause()方法检索)。 (允许使用null值,表示原因不存在或未知。)- 自从:
- 1.5
-