Closed timtebeek closed 1 year ago
@knutwannheden had this to add in chat
We could probably without too much effort develop out own @Matches annotation where the corresponding Matcher receives a J as input. That would allow you to check if it is a MethodInvocation.
What problem are you trying to solve?
Given a recipe such as the following
When the input parameter is a method invocation such as
iterator.next()
Then the template likely should not make any changes.Have you considered any alternatives or workarounds?
Optional.ofNullable()
could work, but isn't as clean of a replacement.Additional context