-
Notifications
You must be signed in to change notification settings - Fork 73
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
Migrate from @lombok.Value to Java records #141
Labels
recipe
Recipe requested
Milestone
Comments
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 14, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 15, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 16, 2023
…ion of the lombok toString method
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 16, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 16, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 16, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
…mber field annotations
3 tasks
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
…ady existing code
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 19, 2023
…vor of MaybeUsesImport
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 23, 2023
kevin0x90
added a commit
to kevin0x90/rewrite-migrate-java
that referenced
this issue
Oct 26, 2023
timtebeek
added a commit
that referenced
this issue
Oct 27, 2023
* #141 add draft of lombok value to java record conversion * License headers * #141 extend implementation with further acceptance criterias * #141 add useExactToString option to generate an exact version of the lombok toString method * #141 format files * #141 minor refactoring * #141 re-order static member * #141 review feedback adjustments * #141 code review feedback, only convert classes without member field annotations * #141 code review feedback, refactor to ScanningRecipe * #141 add lombok value to record conversion to lombok recipes * #141 remove final modifiers in order to align more to already existing code * #141 adjusts precondition check to usage of use type in favor of MaybeUsesImport * Use AnnotationMatcher in more places * Add a test with a static field that breaks * #141 do not convert classes with static members * Collapse checks that all statements are record compatible fields * Extract a separate ScannerVisitor * Add TODO to add type to record constructor post conversion * Any member assignment disqualifies, not just literal * Polish * Polish * Polish * #141 address review feedback * Adopt Boolean for `useExactToString` * Make `useExactToString` optional --------- Co-authored-by: Tim te Beek <tim@moderne.io>
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Convert the simplest cases of Lombok value classes into Java Records.
Narrowly scoped initially, as there's a lot of sometimes experimental Lombok annotations that can complicate matters.
Initial classes should:
The conversion should:
The conversion could;
.toString()
replacementIdeally, given the limited scope, the implementation should not suffer from a lack of Lombok support in the parser. A one-to-one replacement for these simplest of cases should mostly behave the same, with the exception of the
.toString()
method by default.Similar to #116 & #124.
The text was updated successfully, but these errors were encountered: