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

Harmonize registration of reflection hints #29011

Closed
snicoll opened this issue Aug 24, 2022 · 0 comments
Closed

Harmonize registration of reflection hints #29011

snicoll opened this issue Aug 24, 2022 · 0 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Aug 24, 2022

We got some feedback in #28977 that led us to reconsider some of the constructs in ReflectionHints and friends. Looking at the usage we've decided to:

  • Limit the ExecutableMode to a single value, with the ability to determine if a user-provided value is relevant or if it's already included in the configured one
  • Provide consistent registration methods that allows to set the ExecutableMode without having to customize the builder
  • Make sure that methods that do not take a builder and those who take one without mutating it generate consistent hints
@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Aug 24, 2022
@snicoll snicoll added this to the 6.0.0-M6 milestone Aug 24, 2022
snicoll added a commit that referenced this issue Aug 24, 2022
This commit harmonizes the registration of an executable so that
the default method and the method that takes an empty customizer
produces the same hint. The same applies to the readable flag of
a field hint.

Rather than returning a list of executable modes, the "highest" mode
is retained.

See gh-29011
snicoll added a commit that referenced this issue Aug 24, 2022
This commit adapts the registration of fields, constructors, and methods
to provide the same convenience than the reflection-based one available
in ReflectionHints.

See gh-29011
snicoll added a commit to spring-projects/spring-boot that referenced this issue Aug 24, 2022
philwebb added a commit that referenced this issue Sep 2, 2022
Add `MemberCategory` and `FieldMode` shortcuts for type registration.
Helper `builtWith` methods have also been extracted to the Hint types
to allow general reuse (for example with `registerTypes`).

See gh-29011
philwebb added a commit that referenced this issue Sep 2, 2022
Migrate code to make use of the `MemberCategory` and `FieldMode`
shortcuts.

See gh-29011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants