-
Notifications
You must be signed in to change notification settings - Fork 109
Labels
enhancementNew feature or requestNew feature or request
Description
What problem are you trying to solve?
The current Lombok AddGetter and AddSetter recipes do not handle compound field declarations like:
private int x, y, z;
Describe the solution you'd like
Automatically split compound declarations into individual fields.
Generate getters and setters for each field.
Have you considered any alternatives or workarounds?
The workaround is to manually edit the affected files to split the variables onto separate lines.
An alternative would be:
- integrate SplitVariableDeclarations into the getter/setter recipes.
- ensure each field from a compound declaration receives its own accessor methods.
Additional context
- Auto Lombok Host @Getter/@Setter to class level if appropriate
recipe might address this for the specific scenario where all fields can be converted, or it might need to consider the same scenario, but I don't believe it would cover all cases.
Are you interested in contributing this feature to OpenRewrite?
If time permits later but not at the moment.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done