java.lang
Class Throwable
java.lang.Object
java.lang.Throwable
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Error, Exception, UnpositionedError
- public class Throwable
- extends Object
- implements Serializable
Class Specifications |
public represents _message <- this.getMessage();
public represents _cause <- this.getCause();
public represents _stackTrace <- this.getStackTrace(); |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT;
public represents _getClass <- \typeof(this); |
_message
public String _message
- Specifications: non_null
is in groups: objectState
_cause
public Throwable _cause
- Specifications: non_null
is in groups: objectState
causeKnown
public boolean causeKnown
- Specifications:
is in groups: objectState
_stackTrace
public StackTraceElement[] _stackTrace
- Specifications: non_null
is in groups: objectState
Throwable
public Throwable()
- Specifications: pure
-
public normal_behavior
assignable this.*;
ensures this.standardThrowable(null);
Throwable
public Throwable(non_null String message)
- Specifications: pure
-
public normal_behavior
assignable this.*;
ensures this.standardThrowable(message);
Throwable
public Throwable(non_null String message,
non_null Throwable cause)
- Specifications: pure
-
public normal_behavior
ensures this.standardThrowable(message,cause);
Throwable
public Throwable(non_null Throwable cause)
- Specifications: pure
-
public normal_behavior
ensures this.standardThrowable(null,cause);
standardThrowable
public boolean standardThrowable(non_null String s)
- Specifications: pure
-
public normal_behavior
ensures \result == (this._message == s&&!this.causeKnown&&this._cause == null);
standardThrowable
public boolean standardThrowable(non_null String s,
non_null Throwable c)
- Specifications: pure
-
public normal_behavior
ensures \result == ((s != null ==> this._message == s)&&((s == null&&c == null) ==> this._message == null)&&((s == null&&c != null) ==> this._message.equals(c.getClass().theString))&&this.causeKnown&&this._cause == c);
getMessage
public String getMessage()
- Specifications: pure non_null
-
public normal_behavior
ensures \result == this._message;
getLocalizedMessage
public String getLocalizedMessage()
- Specifications: pure non_null
-
public normal_behavior
ensures (this.getMessage() != null) <==> (\result != null);
getCause
public Throwable getCause()
- Specifications: pure non_null
-
public normal_behavior
ensures \result == this._cause;
initCause
public Throwable initCause(non_null Throwable cause)
- Specifications: non_null
-
public normal_behavior
requires !this.causeKnown&&cause != this;
assignable _cause, causeKnown;
ensures \not_modified(_message);
ensures this.getCause() == cause;
ensures \result != null;
ensures this.causeKnown;
- also
-
public exceptional_behavior
requires this.causeKnown;
assignable \nothing;
signals_only java.lang.IllegalStateException;
signals (java.lang.IllegalStateException e) e._message != null&&!e.causeKnown;
- also
-
public exceptional_behavior
requires !this.causeKnown&&cause == this;
assignable \nothing;
signals_only java.lang.IllegalArgumentException;
signals (java.lang.IllegalArgumentException e) e._message != null&&!e.causeKnown;
toString
public String toString()
- Overrides:
toString
in class Object
- Specifications: pure non_null
- also
-
public behavior
requires true;
ensures \result != null;
- also
-
public normal_behavior
requires \typeof(this) == \type(java.lang.Throwable);
ensures this._message == null ==> \result .equals(this.getClass().theString);
ensures this._message != null ==> \result .equals(this.getClass().theString+": "+this._message);
- Specifications inherited from overridden method in class Object:
non_null -
public normal_behavior
assignable objectState;
ensures \result != null;
ensures \result == this.theString;
ensures (* \result is a string representation of this object *);
- also
-
public code normal_behavior
assignable \nothing;
ensures \result != null&&(* \result is the instance's class name, followed by an @, followed by the instance's hashcode in hex *);
- also
-
public code model_program { ... }
- implies_that
-
assignable objectState;
ensures \result != null;
printStackTrace
public void printStackTrace()
printStackTrace
public void printStackTrace(non_null PrintStream s)
- Specifications:
-
public normal_behavior
requires s != null;
assignable \not_specified;
printStackTrace
public void printStackTrace(non_null PrintWriter s)
- Specifications:
-
public normal_behavior
requires s != null;
assignable \not_specified;
fillInStackTrace
public Throwable fillInStackTrace()
- Specifications: non_null
-
public normal_behavior
assignable _stackTrace;
ensures \result == this;
getStackTrace
public StackTraceElement[] getStackTrace()
- Specifications: pure non_null
-
public normal_behavior
ensures \result != null;
ensures ( \forall int i; 0 <= i&&i < this._stackTrace.length; this._stackTrace[i].equals(\result [i]));
setStackTrace
public void setStackTrace(non_null StackTraceElement[] stackTrace)
- Specifications:
-
public normal_behavior
requires stackTrace != null;
requires \nonnullelements(stackTrace);
assignable _stackTrace;
ensures this._stackTrace.equals(stackTrace);
- also
-
public exceptional_behavior
requires stackTrace == null;
assignable \nothing;
signals_only java.lang.NullPointerException;
- also
-
public exceptional_behavior
requires !\nonnullelements(stackTrace);
assignable \nothing;
signals_only java.lang.NullPointerException;
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.