Skip to content

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
evanchooly committed May 13, 2024
1 parent 4f7fcf0 commit 5de5268
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
import org.openrewrite.TreeVisitor;
import org.openrewrite.java.JavaIsoVisitor;
import org.openrewrite.java.MethodMatcher;
import org.openrewrite.java.tree.Expression;
import org.openrewrite.java.tree.J.Identifier;
import org.openrewrite.java.tree.J.MethodInvocation;
import org.openrewrite.java.tree.JavaType;
import org.openrewrite.java.tree.JavaType.Class;

public class PipelineRewrite extends Recipe {

Expand Down Expand Up @@ -67,24 +63,9 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {

return new JavaIsoVisitor<>() {

@Override
public Identifier visitIdentifier(Identifier identifier, ExecutionContext executionContext) {
System.out.println("identifier.getSimpleName() = " + identifier.getSimpleName());
JavaType type = identifier.getType();
System.out.println("identifier.getType() = " + type);
if (type instanceof Class klass && klass.getFullyQualifiedName().equals("dev.morphia.aggregation.Aggregation")) {
System.out.println("klass = " + klass);
}
return super.visitIdentifier(identifier, executionContext);
}

@Override
public MethodInvocation visitMethodInvocation(MethodInvocation methodInvocation, @NotNull ExecutionContext context) {
if (matchers.stream().anyMatch(matcher -> matcher.matches(methodInvocation))) {
Expression expression = methodInvocation.getArguments().get(0);
System.out.println("method = " + methodInvocation.getMethodType());
// System.out.println("expression = " + expression);

return super.visitMethodInvocation(methodInvocation
.withName(methodInvocation.getName().withSimpleName("pipeline")),
context);
Expand Down

0 comments on commit 5de5268

Please sign in to comment.