|
||||||||||
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.jml4.rac.runtime.JMLAssertionError
public abstract class JMLAssertionError
An abstract error class to notify all kinds of runtime assertion violations.
Nested Class Summary | |
---|---|
static class |
JMLAssertionError.Location
Data structure class to represent a source code location including file name, line number, and character position. |
Constructor Summary | |
---|---|
JMLAssertionError(java.lang.String className,
java.lang.String methodName,
java.util.Set<JMLAssertionError.Location> assertions,
java.util.Map<java.lang.String,java.lang.Object> state)
|
|
JMLAssertionError(java.lang.String message,
java.lang.String className,
java.lang.String methodName,
java.util.Set<JMLAssertionError.Location> assertions,
java.util.Map<java.lang.String,java.lang.Object> state)
Create a constructor with an associated message |
Method Summary | |
---|---|
java.lang.String |
className()
Return the name of class that contains the violated assertion. |
java.lang.String |
getMessage()
Returns the associated message along with optional location and state information. |
java.util.Set<JMLAssertionError.Location> |
locations()
Return the locations. |
java.lang.String |
message()
Return the associated message. |
java.lang.String |
methodName()
Return the name of method that contains the violated assertion. |
java.util.Map<java.lang.String,java.lang.Object> |
values()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JMLAssertionError(java.lang.String className, java.lang.String methodName, java.util.Set<JMLAssertionError.Location> assertions, java.util.Map<java.lang.String,java.lang.Object> state)
public JMLAssertionError(java.lang.String message, java.lang.String className, java.lang.String methodName, java.util.Set<JMLAssertionError.Location> assertions, java.util.Map<java.lang.String,java.lang.Object> state)
Method Detail |
---|
public java.lang.String className()
null
.
ensures \result.equals(className);
public java.lang.String methodName()
null
, e.g., in case of invariant
or history constraint violations.
ensures \result == null || \result.equals(methodName);
public java.lang.String message()
String
messagepublic java.util.Set<JMLAssertionError.Location> locations()
null
and
contains strings of the form: "file_name:line_no:column_no".
ensures \result == locations;
public java.util.Map<java.lang.String,java.lang.Object> values()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |