本文整理匯總了Java中org.walkmod.javalang.ast.stmt.ForStmt類的典型用法代碼示例。如果您正苦於以下問題:Java ForStmt類的具體用法?Java ForStmt怎麽用?Java ForStmt使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ForStmt類屬於org.walkmod.javalang.ast.stmt包,在下文中一共展示了ForStmt類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public Boolean visit(ForStmt n1, Node arg) {
ForStmt n2 = (ForStmt) arg;
if (!nodesEquals(n1.getInit(), n2.getInit())) {
return Boolean.FALSE;
}
if (!nodeEquals(n1.getCompare(), n2.getCompare())) {
return Boolean.FALSE;
}
if (!nodesEquals(n1.getUpdate(), n2.getUpdate())) {
return Boolean.FALSE;
}
if (!nodeEquals(n1.getBody(), n2.getBody())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
示例2: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public Node visit(ForStmt n, A arg) {
List<Expression> init = n.getInit();
if (init != null) {
for (int i = 0; i < init.size(); i++) {
init.set(i, (Expression) init.get(i).accept(this, arg));
}
removeNulls(init);
}
if (n.getCompare() != null) {
n.setCompare((Expression) n.getCompare().accept(this, arg));
}
List<Expression> update = n.getUpdate();
if (update != null) {
for (int i = 0; i < update.size(); i++) {
update.set(i, (Expression) update.get(i).accept(this, arg));
}
removeNulls(update);
}
n.setBody((Statement) n.getBody().accept(this, arg));
return n;
}
示例3: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public void visit(ForStmt n, VisitorContext ctx) {
Object o = ctx.get(NODE_TO_COMPARE_KEY);
if (o != null && o instanceof ForStmt) {
ForStmt aux = (ForStmt) o;
boolean backup = isUpdated();
setIsUpdated(false);
inferASTChanges(n.getInit(), aux.getInit());
inferASTChanges(n.getUpdate(), aux.getUpdate());
inferASTChanges(n.getCompare(), aux.getCompare());
inferASTChanges(n.getBody(), aux.getBody());
if (!isUpdated()) {
increaseUnmodifiedNodes(ForeachStmt.class);
} else {
increaseUpdatedNodes(ForeachStmt.class);
}
setIsUpdated(backup || isUpdated());
} else if (o != null) {
setIsUpdated(true);
applyUpdate(n, (Node) o);
}
}
示例4: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
@Override
public Node visit(ForStmt _n, Object _arg) {
List<Expression> init = visit(_n.getInit(), _arg);
Expression compare = cloneNodes(_n.getCompare(), _arg);
List<Expression> update = visit(_n.getUpdate(), _arg);
Statement body = cloneNodes(_n.getBody(), _arg);
ForStmt r = new ForStmt(_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(), init,
compare, update, body);
return r;
}
示例5: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public void visit(ForStmt n, VisitorContext arg) {
if (preVisitor != null) {
preVisitor.visit(n, arg);
}
super.visit(n, arg);
if (postVisitor != null) {
postVisitor.visit(n, arg);
}
}
示例6: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public R visit(ForStmt n, A arg);
示例7: visit
import org.walkmod.javalang.ast.stmt.ForStmt; //導入依賴的package包/類
public void visit(ForStmt n, A arg);