Generalized usage of idealOrdering for coordinates #257
-
Yammering this out, but: I've been thinking about the usage of rewrite/rewrite-java/src/main/java/org/openrewrite/java/tree/Coordinates.java Lines 193 to 195 in d21da2e I can think of situations where it'd be valuable to add a new field or method decl to a class; could specifying some sort of comparator or ideal insertion ordering help in the general case? As in, if I wanted to insert a new What would, if any, a generalized usage of idealordering look like? If I was inserting a new MethodDeclaration, then nn a ClassDeclaration, could I specify Just putting the thought out there 👍 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looking to add a method to |
Beta Was this translation helpful? Give feedback.
Looking to add a method to
ListUtils
to generalize this: