Skip to content

Add support for class-level Lombok @Getter and @Setter annotations - #1202

Open
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/hoist-lombok-accessors
Open

Add support for class-level Lombok @Getter and @Setter annotations#1202
Ouweshs28 wants to merge 1 commit into
openrewrite:mainfrom
Ouweshs28:fix/hoist-lombok-accessors

Conversation

@Ouweshs28

@Ouweshs28 Ouweshs28 commented Aug 14, 2026

Copy link
Copy Markdown

What's changed?

  • Added UseLombokGetterOnType and UseLombokSetterOnType recipes to hoist default field-level Lombok accessor annotations to the class level.
  • Added the recipes to LombokBestPractices after the existing field-level accessor conversions.
  • Updated recipes.csv.
  • Added positive, negative, and composite-recipe coverage.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Please review the eligibility rules for static, final, $-prefixed, configured, and mixed variable declarations. These fields retain their field-level annotations when Lombok type-level accessors would not generate equivalent methods.

Anyone you would like to review specifically?

N/A

Have you considered any alternatives or workarounds?

I considered extending the existing field-level getter/setter recipes directly and using the external summarization recipes referenced in the issue. Separate composable recipes keep existing behavior stable while allowing LombokBestPractices to hoist annotations after field-level conversion.

Any additional context

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Hoist Lombok @Getter/@Setter to class level if appropriate

1 participant