|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Error
org.jmlspecs.jmlrac.runtime.JMLAssertionError
An abstract error class to notify all kinds of runtime assertion violations.
| Field Summary | |
protected String |
className
Name of the class or interface that contains the violated assertion. |
protected Set |
locations
The locations (strings of the form: "file_name:line_num:column_num") of the violated assertion. |
protected String |
methodName
Name of the method that contains the violated assertion. |
| Fields inherited from class java.lang.Error |
|
| Fields inherited from class java.lang.Throwable |
|
| Constructor Summary | |
protected |
JMLAssertionError(String message)
Creates a new JMLAssertionError instance with given
message. |
protected |
JMLAssertionError(String message,
Throwable cause)
|
protected |
JMLAssertionError(Throwable cause)
|
| 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
invariant className != null;
protected String methodName
null if the assertion is not associated
with any particular methods, e.g., invariants or history constraints.
protected Set locations
invariant locations != null && (\forall Object o; locations.contains(o); o instanceof String);
| 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.
ensures \result.equals(className);
public String methodName()
null, e.g., in case of invariant
or history constraint violations.
ensures \result == null || \result.equals(methodName);
public String message()
String messagepublic Set locations()
null and
contains strings of the form: "file_name:line_no:column_no".
ensures \result == locations;
public String getMessage()
also ensures \result != null;
getMessage in class ThrowableString message
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||