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
public class IllegalStateException extends RuntimeException
不正または不適切なときにメソッドが呼び出されたことを示します。 すなわち、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を構築します。 詳細メッセージとは、この例外を記述するStringです。 -
IllegalStateException
public IllegalStateException(String s) 指定された詳細メッセージを持つIllegalStateExceptionを構築します。 詳細メッセージとは、この例外を記述するStringです。- パラメータ:
s
- 詳細メッセージを含む文字列
-
IllegalStateException
指定された詳細メッセージおよび原因を使用して新規例外を構築します。cause
と関連付けられた詳細メッセージが、この例外の詳細メッセージに自動的に統合されることはありません。- パラメータ:
message
- 詳細メッセージ(あとでThrowable.getMessage()
メソッドで取得できるように保存される)。cause
- 原因(あとでThrowable.getCause()
メソッドで取得できるように保存される)。 (null
値が許可されており、原因が存在しないか不明であることを示す。)- 導入されたバージョン:
- 1.5
-
IllegalStateException
public IllegalStateException(Throwable cause) 指定された原因と詳細メッセージ(cause==null ? null : cause.toString())
を持つ新しい例外を構築します(通常、cause
のクラスと詳細メッセージを含みます)。 このコンストラクタは、例外がほかのスロー可能オブジェクト(PrivilegedActionException
など)のラッパーである場合に有用です。- パラメータ:
cause
- 原因(あとでThrowable.getCause()
メソッドで取得できるように保存される)。 (null
値が許可されており、原因が存在しないか不明であることを示す。)- 導入されたバージョン:
- 1.5
-