Skip to content
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

Annotation Matcher with inner Enums as Attribute Values #4867

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MBoegers
Copy link
Contributor

@MBoegers MBoegers commented Jan 8, 2025

What's changed?

What's your motivation?

Application Frameworks like Spring often user enums for annotation attributes to restrict the possible values.
Often these enums are defined within the annotation class itself as inner enums.
Traits canot work 100% in this cases.

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

There is a new ToDo this line is the problem.
The root problem seems to be that the type of FieldAccess for inner enums is not set correctly.

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

Add adtional checks in the visitor methods.

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

…butes are not detectable by AnnotationMatchers
@MBoegers MBoegers marked this pull request as draft January 8, 2025 12:30
@timtebeek timtebeek changed the title Annotaion Matcher with inner Enums as Attribute Values Annotation Matcher with inner Enums as Attribute Values Jan 8, 2025
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.

1 participant