use of com.github.javaparser.ast.expr.SuperExpr in project checker-framework by typetools.
the class DoubleJavaParserVisitor method visit.
@Override
public void visit(final SuperExpr node1, final Node other) {
SuperExpr node2 = (SuperExpr) other;
defaultAction(node1, node2);
node1.getTypeName().ifPresent(l -> l.accept(this, node2.getTypeName().get()));
}
use of com.github.javaparser.ast.expr.SuperExpr in project checker-framework by typetools.
the class JointJavacJavaParserVisitor method visitMemberSelect.
@Override
public Void visitMemberSelect(MemberSelectTree javacTree, Node javaParserNode) {
if (javaParserNode instanceof FieldAccessExpr) {
FieldAccessExpr node = (FieldAccessExpr) javaParserNode;
processMemberSelect(javacTree, node);
javacTree.getExpression().accept(this, node.getScope());
} else if (javaParserNode instanceof Name) {
Name node = (Name) javaParserNode;
processMemberSelect(javacTree, node);
assert node.getQualifier().isPresent();
javacTree.getExpression().accept(this, node.getQualifier().get());
} else if (javaParserNode instanceof ClassOrInterfaceType) {
ClassOrInterfaceType node = (ClassOrInterfaceType) javaParserNode;
processMemberSelect(javacTree, node);
assert node.getScope().isPresent();
javacTree.getExpression().accept(this, node.getScope().get());
} else if (javaParserNode instanceof ClassExpr) {
ClassExpr node = (ClassExpr) javaParserNode;
processMemberSelect(javacTree, node);
javacTree.getExpression().accept(this, node.getType());
} else if (javaParserNode instanceof ThisExpr) {
ThisExpr node = (ThisExpr) javaParserNode;
processMemberSelect(javacTree, node);
assert node.getTypeName().isPresent();
javacTree.getExpression().accept(this, node.getTypeName().get());
} else if (javaParserNode instanceof SuperExpr) {
SuperExpr node = (SuperExpr) javaParserNode;
processMemberSelect(javacTree, node);
assert node.getTypeName().isPresent();
javacTree.getExpression().accept(this, node.getTypeName().get());
} else {
throwUnexpectedNodeType(javacTree, javaParserNode);
}
return null;
}
Aggregations