|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.compiler.ASTVisitor
org.jmlspecs.jml4.rac.InlineAssertionMerger
public class InlineAssertionMerger
Merges RAC code of JML in-line assertions to their original assertions.
merge(Statement[], Statement[])
Constructor Summary | |
---|---|
InlineAssertionMerger()
Creates a new merger. |
Method Summary | |
---|---|
void |
endVisit(Block block,
BlockScope scope)
Overridden here to replace JML in-line assertions contained in the given block with their RAC code. |
void |
endVisit(DoStatement doStatement,
BlockScope scope)
|
void |
endVisit(ForeachStatement forStatement,
BlockScope scope)
|
void |
endVisit(ForStatement forStatement,
BlockScope scope)
|
void |
endVisit(IfStatement ifStatement,
BlockScope scope)
|
void |
endVisit(JmlDoStatement doStatement,
BlockScope scope)
|
void |
endVisit(JmlForeachStatement foreachStatement,
BlockScope scope)
|
void |
endVisit(JmlForStatement forStatement,
BlockScope scope)
|
void |
endVisit(JmlWhileStatement jmlwhileStatement,
BlockScope scope)
|
void |
endVisit(LabeledStatement labeledStatement,
BlockScope scope)
|
void |
endVisit(LocalDeclaration localDeclaration,
BlockScope scope)
A visitor method to check whether a localDeclaration have ghost modifier, ghost . |
void |
endVisit(WhileStatement whileStatement,
BlockScope scope)
|
void |
merge(Statement[] to,
Statement[] from)
Merges RAC code of JML in-line assertions contained in from to the ASTs of to . |
boolean |
visit(Block block,
BlockScope scope)
Overridden Visitor methods to keep track of inline statements that are not embedded inside blocks. |
boolean |
visit(DoStatement doStatement,
BlockScope scope)
|
boolean |
visit(ForeachStatement forStatement,
BlockScope scope)
|
boolean |
visit(ForStatement forStatement,
BlockScope scope)
|
boolean |
visit(IfStatement ifStatement,
BlockScope scope)
|
boolean |
visit(LabeledStatement labeledStatement,
BlockScope scope)
|
boolean |
visit(WhileStatement whileStatement,
BlockScope scope)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InlineAssertionMerger()
Method Detail |
---|
public void merge(Statement[] to, Statement[] from)
from
to the ASTs of to
. This method
replaces every JML in-line assertion in to
, directly
or indirectly (as a nested statement), with its RAC code located
in from. If to[i] (or its child node)
is a JML in-line assertion, its RAC code is found in
from[j]
, where j
is the index given
in terms of the AST visitor traversal order.
requires to != null && from != null;
public void endVisit(Block block, BlockScope scope)
endVisit
in class ASTVisitor
public void endVisit(LocalDeclaration localDeclaration, BlockScope scope)
ghost
. If
it contains, it is commented, in this case it is removed.
endVisit
in class ASTVisitor
public boolean visit(Block block, BlockScope scope)
Such examples can be associated with if, if-else, if-elseif, while, for, do-while statements.if (C)
visit
in class ASTVisitor
public void endVisit(JmlWhileStatement jmlwhileStatement, BlockScope scope)
endVisit
in class ASTVisitor
public void endVisit(JmlDoStatement doStatement, BlockScope scope)
endVisit
in class ASTVisitor
public void endVisit(JmlForStatement forStatement, BlockScope scope)
endVisit
in class ASTVisitor
public void endVisit(JmlForeachStatement foreachStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(LabeledStatement labeledStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(LabeledStatement labeledStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(DoStatement doStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(DoStatement doStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(ForeachStatement forStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(ForeachStatement forStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(ForStatement forStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(ForStatement forStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(IfStatement ifStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(IfStatement ifStatement, BlockScope scope)
endVisit
in class ASTVisitor
public boolean visit(WhileStatement whileStatement, BlockScope scope)
visit
in class ASTVisitor
public void endVisit(WhileStatement whileStatement, BlockScope scope)
endVisit
in class ASTVisitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |