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

(3.x) Rewrite Annotation introspection methods for Enum handling #2550

Open
cowtowncoder opened this issue Nov 24, 2019 · 0 comments
Open

(3.x) Rewrite Annotation introspection methods for Enum handling #2550

cowtowncoder opened this issue Nov 24, 2019 · 0 comments
Labels

Comments

@cowtowncoder
Copy link
Member

The way Enum introspection works via AnnotationIntrospection in 2.x is fragmented and results in multiple passes along related but unconnected pieces; first for primary names, then for default values, and then for aliases. Since information is mostly the same it would make sense to change handling to be at slightly higher level, combination logical pieces.

It would either make sense to combine everything into just one combo method, or, possible two:

  1. Method that just discovers all accessors (in case of Enums, Fields), return as ordered List or array of AnnotatedFields
  2. Method that given result of (1) will further determine names, aliases, and possible default value

One additional benefit from rewrite is that it could allow supporting mix-in override: in 2.x mix-ins do not work for Enums as far as I understand code (since it by-passes AnnotatedField and directly operates on basic JDK Field instances instead).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant