|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.multijava.mjc.JExpression
org.jmlspecs.checker.JmlExpression
org.jmlspecs.checker.JmlInformalExpression
JmlInformalExpression.java
| Field Summary | |
private boolean |
isBoolean
Is this informal description of type boolean or int? |
private String |
text
The text of this informal description. |
| Fields inherited from class org.multijava.mjc.JExpression |
EMPTY |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
|
JmlInformalExpression(TokenReference where,
String text)
Constructs an instance. |
private |
JmlInformalExpression(TokenReference where,
String text,
boolean isBoolean)
Constructs an instance. |
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor. |
JLiteral |
getLiteral()
Returns the literal value of this expression |
CType |
getType()
Returns the type of this informal description. |
boolean |
isConstant()
Returns true if this is a constant. |
static JmlInformalExpression |
ofBoolean(TokenReference where,
String text)
Returns a new informal description of type boolean. |
static JmlInformalExpression |
ofInteger(JmlInformalExpression expr)
Returns a new informal description of type int out of the given informal description expression. |
static JmlInformalExpression |
ofInteger(TokenReference where,
String text)
Returns a new informal description of type int. |
String |
text()
Returns the text of this informal description. |
JExpression |
typecheck(CExpressionContextType context)
Typechecks the expression and mutates the context to record information gathered during typechecking. |
| Methods inherited from class org.jmlspecs.checker.JmlExpression |
genCode |
| Methods inherited from class org.multijava.mjc.JExpression |
buildUniverseDynChecks, clone, convertType, dumpArray, fail, genBranch, genUniverseDynCheckCode, getApparentType, getBooleanLiteral, getFANonNulls, getFANulls, getNumberLiteral, getOrdinalLiteral, getRealLiteral, getStringLiteral, isAssignableTo, isBooleanLiteral, isDeclaredNonNull, isLiteral, isMaybeInitializable, isNonNull, isOrdinalLiteral, isRealLiteral, isStatementExpression, isStringLiteral, typecheck, unParenthesize |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private String text
private final boolean isBoolean
| Constructor Detail |
public JmlInformalExpression(TokenReference where,
String text)
private JmlInformalExpression(TokenReference where,
String text,
boolean isBoolean)
isBoolean
is true, a boolean-typed informal description is constructed;
otherwise, an int-typed one is constructed.
| Method Detail |
public static JmlInformalExpression ofBoolean(TokenReference where,
String text)
public static JmlInformalExpression ofInteger(TokenReference where,
String text)
public static JmlInformalExpression ofInteger(JmlInformalExpression expr)
public String text()
public CType getType()
public boolean isConstant()
isConstant in class JExpressionpublic JLiteral getLiteral()
JExpression
getLiteral in class JExpression
public JExpression typecheck(CExpressionContextType context)
throws PositionedError
typecheck in class JmlExpressioncontext - the context in which this expression appears
PositionedError - if the check fails public void accept(MjcVisitor p)
accept in class JmlExpressionp - the visitor
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||