|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmlspecs.jmlrac.runtime.JMLRacValue
A class for denoting JML expressible values for the runtime assertion checker. In addition to regular Java values and objects, this class can represent two special JML values: undefinedness and non-executability. An undefined value denotes the value of an expression that throws an exception during evaluation. Similarly, a non-executable value denotes a non-executable JML expression.
Class Specifications |
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.Object |
_getClass, objectState, theString |
Ghost Field Summary |
Ghost fields inherited from class java.lang.Object |
objectTimesFinalized, owner |
Field Summary | |
private static JMLRacValue |
ANGEL
A unique object to represent an angelic undefinedness such as non-executable specification constructs. |
private static JMLRacValue |
DEMON
A unique object to represent a demonic undefinedness such as runtime exceptions. |
private Object |
value
The object wrapped by this instance of class JMLRacValue . |
Constructor Summary | |
private |
JMLRacValue()
Constructs a new instance. |
private |
JMLRacValue(Object value)
Constructs a new instance. |
Model Method Summary |
Model methods inherited from class java.lang.Object |
hashValue |
Method Summary | |
private void |
checkUndefinedness()
Throws appropriate exception if this object represents either angelic or demonic undefinedness. |
boolean |
isAngel()
Returns true if this object represents an angelic undefinedness. |
boolean |
isDemon()
Returns true if this object represents a demonic undefinedness. |
static JMLRacValue |
ofBoolean(boolean v)
Returns a new JMLRacValue object that wraps the given boolean value, v . |
static JMLRacValue |
ofInt(int v)
Returns a new JMLRacValue object that wraps the given int value, v . |
static JMLRacValue |
ofNonExecutable()
Returns an instance that denotes a demonic undefinedness. |
static JMLRacValue |
ofObject(Object v)
Returns a new JMLRacValue object that wraps the given argument. |
static JMLRacValue |
ofUndefined()
Returns an instance that denotes an angelic undefinedness. |
String |
toString()
Returns the string representation of this object. |
Object |
value()
Returns the wrapped value of this JMLRacValue object . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final JMLRacValue ANGEL
private static final JMLRacValue DEMON
private Object value
JMLRacValue
. Note that it may be null.
Constructor Detail |
private JMLRacValue(Object value)
value
, may be null
.
private JMLRacValue()
Method Detail |
public static JMLRacValue ofUndefined()
public static JMLRacValue ofNonExecutable()
public static JMLRacValue ofObject(Object v)
public static JMLRacValue ofBoolean(boolean v)
v
.
public static JMLRacValue ofInt(int v)
v
.
public Object value()
public boolean isAngel()
public boolean isDemon()
private void checkUndefinedness()
public String toString()
toString
in class Object
|
JML | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |