java.lang
Class IllegalStateException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by java.lang.RuntimeException sample code for java.lang.RuntimeException definition code for java.lang.RuntimeException 
              extended by java.lang.IllegalStateException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
AlreadyConnectedException sample code for java.nio.channels.AlreadyConnectedException definition code for java.nio.channels.AlreadyConnectedException , CancellationException sample code for java.util.concurrent.CancellationException definition code for java.util.concurrent.CancellationException , CancelledKeyException sample code for java.nio.channels.CancelledKeyException definition code for java.nio.channels.CancelledKeyException , ClosedSelectorException sample code for java.nio.channels.ClosedSelectorException definition code for java.nio.channels.ClosedSelectorException , ConnectionPendingException sample code for java.nio.channels.ConnectionPendingException definition code for java.nio.channels.ConnectionPendingException , FormatterClosedException sample code for java.util.FormatterClosedException definition code for java.util.FormatterClosedException , IllegalBlockingModeException sample code for java.nio.channels.IllegalBlockingModeException definition code for java.nio.channels.IllegalBlockingModeException , IllegalComponentStateException sample code for java.awt.IllegalComponentStateException definition code for java.awt.IllegalComponentStateException , InvalidDnDOperationException sample code for java.awt.dnd.InvalidDnDOperationException definition code for java.awt.dnd.InvalidDnDOperationException , InvalidMarkException sample code for java.nio.InvalidMarkException definition code for java.nio.InvalidMarkException , NoConnectionPendingException sample code for java.nio.channels.NoConnectionPendingException definition code for java.nio.channels.NoConnectionPendingException , NonReadableChannelException sample code for java.nio.channels.NonReadableChannelException definition code for java.nio.channels.NonReadableChannelException , NonWritableChannelException sample code for java.nio.channels.NonWritableChannelException definition code for java.nio.channels.NonWritableChannelException , NotYetBoundException sample code for java.nio.channels.NotYetBoundException definition code for java.nio.channels.NotYetBoundException , NotYetConnectedException sample code for java.nio.channels.NotYetConnectedException definition code for java.nio.channels.NotYetConnectedException , OverlappingFileLockException sample code for java.nio.channels.OverlappingFileLockException definition code for java.nio.channels.OverlappingFileLockException

public class IllegalStateException
extends RuntimeException sample code for java.lang.RuntimeException definition code for java.lang.RuntimeException

Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation.

Since:
JDK1.1
See Also:
Serialized Form

Constructor Summary
IllegalStateException sample code for java.lang.IllegalStateException.IllegalStateException() definition code for java.lang.IllegalStateException.IllegalStateException() ()
          Constructs an IllegalStateException with no detail message.
IllegalStateException sample code for java.lang.IllegalStateException.IllegalStateException(java.lang.String) definition code for java.lang.IllegalStateException.IllegalStateException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  s)
          Constructs an IllegalStateException with the specified detail message.
IllegalStateException sample code for java.lang.IllegalStateException.IllegalStateException(java.lang.String, java.lang.Throwable) definition code for java.lang.IllegalStateException.IllegalStateException(java.lang.String, java.lang.Throwable) (String sample code for java.lang.String definition code for java.lang.String  message, Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Constructs a new exception with the specified detail message and cause.
IllegalStateException sample code for java.lang.IllegalStateException.IllegalStateException(java.lang.Throwable) definition code for java.lang.IllegalStateException.IllegalStateException(java.lang.Throwable) (Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
          Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
 
Method Summary
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) , toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

IllegalStateException sample code for java.lang.IllegalStateException() definition code for java.lang.IllegalStateException()

public IllegalStateException()
Constructs an IllegalStateException with no detail message. A detail message is a String that describes this particular exception.


IllegalStateException sample code for java.lang.IllegalStateException(java.lang.String) definition code for java.lang.IllegalStateException(java.lang.String)

public IllegalStateException(String sample code for java.lang.String definition code for java.lang.String  s)
Constructs an IllegalStateException with the specified detail message. A detail message is a String that describes this particular exception.

Parameters:
s - the String that contains a detailed message

IllegalStateException sample code for java.lang.IllegalStateException(java.lang.String, java.lang.Throwable) definition code for java.lang.IllegalStateException(java.lang.String, java.lang.Throwable)

public IllegalStateException(String sample code for java.lang.String definition code for java.lang.String  message,
                             Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Constructs a new exception with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this exception's detail message.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.5

IllegalStateException sample code for java.lang.IllegalStateException(java.lang.Throwable) definition code for java.lang.IllegalStateException(java.lang.Throwable)

public IllegalStateException(Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable  cause)
Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables (for example, PrivilegedActionException sample code for java.security.PrivilegedActionException definition code for java.security.PrivilegedActionException ).

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.5