-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaTemplate
matching on parameterized types
#3963
Conversation
Also start working on producing a `JavaType` rather than a `String` representation.
In an expression like `Long.parseLong("1")` the `Long` type reference is not an expression and should not be matched by a template like `#{any(long)}`.
I think now it is basically working. I had to change the internal representation we use for template parameters to use a In this area there is still some performance improvements that can be made: We should change the rewrite/rewrite-java/src/main/java/org/openrewrite/java/JavaTemplateSemanticallyEqual.java Lines 65 to 124 in 6acddbf
But I will leave this optimization for another PR. Further, I am quite sure there are still bugs in the area of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
JavaTemplate
matching on parameterized types
Adding support for parameterized types in the grammar of the template parser and for matching as performed by
JavaTemplate#matches()
.