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

Allow bean creation with final fields #2

Open
tobiasstamann opened this issue Jul 6, 2018 · 1 comment
Open

Allow bean creation with final fields #2

tobiasstamann opened this issue Jul 6, 2018 · 1 comment

Comments

@tobiasstamann
Copy link
Contributor

It must be possible to create beans with final fields.

Final fields are usually initialized via constructor parameters.
Algorithm must try to map parameters via name.
Otherwise it could be explicitely mapped via an annotation on constructor parameters

Constraints:

  • Class must not have a noarg constructor
  • Constructor must not have any parameters which can't be mapped to (constant) fields or to super classes
@tobiasstamann
Copy link
Contributor Author

We could introduce an explicit annotation for constructor parameter mappings, if mapping by name doesn't work.
This could contain also mappings to super class fields (To determine if a parameter initializes a field or not)

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

No branches or pull requests

1 participant