|
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.jmlspecs.checker.JmlNode
org.jmlspecs.checker.JmlStoreRef
org.jmlspecs.checker.JmlStoreRefExpression
An AST node class for JML store reference expressions. The production rule for the store reference expressions, store-ref-expression is defined as follows.
store-ref-expression ::= store-ref-name [ store-ref-name-suffix ] ...
store-ref-name ::= ident | "super" | "this"
store-ref-name-suffix ::= "." ident | "this" | "[" spec-array-ref-expr "]"
spec-array-ref-expr ::= spec-expression
| spec-expression ".." spec-expression
| "*"
| Nested Class Summary |
| Nested classes inherited from class org.jmlspecs.checker.JmlNode |
JmlNode.DummyInitializerDeclaration |
| Field Summary | |
private JExpression |
expression
|
private boolean |
isFieldsOf
|
private String |
name
|
private JmlName[] |
names
The initial name and name suffixes of this store-ref-expression. |
| Fields inherited from class org.jmlspecs.checker.JmlNode |
MJCVISIT_MESSAGE |
| Fields inherited from class org.multijava.mjc.JPhylum |
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 | |
JmlStoreRefExpression(TokenReference where,
JmlName[] names)
|
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor. |
JExpression |
expression()
Returns an expression object corresponding to this store ref expression. |
CFieldAccessor |
getField()
Returns CFieldAccessor of this store ref expression
if it denotes denotes a class field. |
String |
getName()
|
CType |
getType()
Returns the type of this store ref expression. |
boolean |
isFieldOfReceiver()
Returns true if the store-ref expression refers to a field of the current receiver (this). |
boolean |
isInvalidModelFieldRef()
Returns true iff the store ref expression accesses a field of a model field. |
boolean |
isLocalVarReference()
|
boolean |
isModelField()
Returns true if the given argument refers to a model field. |
boolean |
isStoreRefExpression()
|
boolean |
isSuperExpression()
Returns true iff the store ref expression is the pseudo variable 'super'. |
boolean |
isThisExpression()
Returns true iff the store ref expression is the receiver 'this'. |
JmlName[] |
names()
|
String |
toString()
|
JmlStoreRef |
typecheck(CExpressionContextType context,
long privacy)
Typechecks this store reference in the given visibility, privacy, and mutates the context,
context, to record information gathered during
typechecking. |
JmlStoreRef |
typecheck(CExpressionContextType context,
long privacy,
CType type)
Typechecks this store reference in the given visibility, privacy, and mutates the context,
context, to record information gathered during
typechecking. |
| Methods inherited from class org.jmlspecs.checker.JmlStoreRef |
clone, isEverything, isInformalStoreRef, isNothing, isNothingOrNotSpecified, isNotSpecified, isPrivateData |
| Methods inherited from class org.jmlspecs.checker.JmlNode |
enterSpecScope, enterSpecScope, exitSpecScope, exitSpecScope, privacy, privacyString |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, 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, wait, wait, wait |
| Field Detail |
private final JmlName[] names
private JExpression expression
private boolean isFieldsOf
private final String name
| Constructor Detail |
public JmlStoreRefExpression(TokenReference where,
JmlName[] names)
| Method Detail |
public boolean isStoreRefExpression()
isStoreRefExpression in class JmlStoreRefpublic String getName()
public JmlName[] names()
public CType getType()
public JExpression expression()
public boolean isSuperExpression()
isSuperExpression in class JmlStoreRefpublic boolean isThisExpression()
isThisExpression in class JmlStoreRefpublic boolean isInvalidModelFieldRef()
isInvalidModelFieldRef in class JmlStoreRefpublic String toString()
toString in class Objectpublic boolean isModelField()
requires (* called after typechecking *);
public boolean isFieldOfReceiver()
isFieldOfReceiver in class JmlStoreRefpublic CFieldAccessor getField()
CFieldAccessor of this store ref expression
if it denotes denotes a class field.
Otherwise, return null.
This method must be called after typechecking.
requires (* called after typechecking *);
public boolean isLocalVarReference()
isLocalVarReference in class JmlStoreRef
public JmlStoreRef typecheck(CExpressionContextType context,
long privacy)
throws PositionedError
privacy, and mutates the context,
context, to record information gathered during
typechecking.
context - the context in which this store reference appearsprivacy - the visibility in which to typecheck
PositionedError - if the check fails
public JmlStoreRef typecheck(CExpressionContextType context,
long privacy,
CType type)
throws PositionedError
privacy, and mutates the context,
context, to record information gathered during
typechecking.
context - the context in which this store reference appearsprivacy - the visibility in which to typechecktype - the type whose fields this store reference is supposed
to denote
PositionedError - if the check fails public void accept(MjcVisitor p)
accept in class JmlStoreRefp - the visitor
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||