use of com.github.javaparser.ast.stmt.DoStmt in project drools by kiegroup.
the class DoStmtT method toJavaExpression.
@Override
public Node toJavaExpression() {
DoStmt stmt = new DoStmt();
stmt.setCondition((Expression) condition.toJavaExpression());
stmt.setBody((Statement) body.toJavaExpression());
return stmt;
}
use of com.github.javaparser.ast.stmt.DoStmt in project checker-framework by typetools.
the class JointJavacJavaParserVisitor method visitDoWhileLoop.
@Override
public Void visitDoWhileLoop(DoWhileLoopTree javacTree, Node javaParserNode) {
DoStmt node = castNode(DoStmt.class, javaParserNode, javacTree);
processDoWhileLoop(javacTree, node);
// In javac the condition is parenthesized but not in JavaParser.
ExpressionTree condition = ((ParenthesizedTree) javacTree.getCondition()).getExpression();
condition.accept(this, node.getCondition());
javacTree.getStatement().accept(this, node.getBody());
return null;
}
use of com.github.javaparser.ast.stmt.DoStmt in project checker-framework by typetools.
the class DoubleJavaParserVisitor method visit.
@Override
public void visit(final DoStmt node1, final Node other) {
DoStmt node2 = (DoStmt) other;
defaultAction(node1, node2);
node1.getBody().accept(this, node2.getBody());
node1.getCondition().accept(this, node2.getCondition());
}
Aggregations