|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Error org.jmlspecs.jmlrac.runtime.JMLAssertionError
An abstract error class to notify all kinds of runtime assertion violations.
Class Specifications |
invariant this.className != null; invariant this.locations != null&&( \forall java.lang.Object o; this.locations.contains(o); o instanceof java.lang.String); |
Specifications inherited from class Error |
initially java.lang.Error.serialVersionUID == 4980196508277280342; |
Specifications inherited from class Throwable |
public invariant \nonnullelements(this._stackTrace); public represents causeSet <- this._cause != this; |
Specifications inherited from class Object |
represents objectState <- org.jmlspecs.lang.JMLDataGroup.IT; public represents _getClass <- \typeof(this); |
Model Field Summary |
Model fields inherited from class java.lang.Throwable |
_cause, _message, _stackTrace, causeSet |
Model fields inherited from class java.lang.Object |
_getClass, objectState, theString |
Ghost Field Summary |
Ghost fields inherited from class java.lang.Object |
objectTimesFinalized, owner |
Field Summary | |
[spec_public] protected String |
className
|
[spec_public] protected Set |
locations
|
[spec_public] protected String |
methodName
Name of the method that contains the violated assertion. |
Fields inherited from class java.lang.Error |
|
Constructor Summary | |
protected |
JMLAssertionError(String message)
Creates a new JMLAssertionError instance with given
message. |
protected |
JMLAssertionError(String message,
Throwable cause)
|
protected |
JMLAssertionError(Throwable cause)
|
Model Method Summary |
Model methods inherited from class java.lang.Throwable |
initMessage, standardThrowable, standardThrowable, standardThrowable, standardThrowable |
Model methods inherited from class java.lang.Object |
hashValue |
Method Summary | |
String |
className()
Return the name of class that contains the violated assertion. |
String |
getMessage()
Return the associated message concatenated with location information. |
Set |
locations()
Return the locations. |
String |
message()
Return the associated message. |
String |
methodName()
Return the name of method that contains the violated assertion. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected String className
protected String methodName
null
if the assertion is not associated
with any particular methods, e.g., invariants or history constraints.
protected Set locations
Constructor Detail |
protected JMLAssertionError(String message)
JMLAssertionError
instance with given
message.
message
- an informative message; can be null
.protected JMLAssertionError(String message, Throwable cause)
protected JMLAssertionError(Throwable cause)
Method Detail |
public String className()
null
.
public String methodName()
null
, e.g., in case of invariant
or history constraint violations.
public String message()
String
messagepublic Set locations()
null
and
contains strings of the form: "file_name:line_no:column_no".
public String getMessage()
getMessage
in class Throwable
String
message
|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |