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

Generator: Add static list of fields in generated manager interfaces #528

Closed
Pyknic opened this issue Oct 10, 2017 · 0 comments
Closed

Generator: Add static list of fields in generated manager interfaces #528

Pyknic opened this issue Oct 10, 2017 · 0 comments
Assignees
Milestone

Comments

@Pyknic
Copy link
Contributor

Pyknic commented Oct 10, 2017

Currently you need an instance of Manager to obtain a stream of fields, even though all the fields are static instances. We can add a static way of obtaining the stream by introducing a static immutable list of fields in the generated manager interface and use it in the generated Manager#fields()-method. This will change the generated code, but not change the API.

Example:

FilmManager.FIELDS.stream()
    .map(Field::identifier)
    .forEachOrdered(System.out::println)
@Pyknic Pyknic added this to the 3.0.15 Forest milestone Oct 10, 2017
@Pyknic Pyknic self-assigned this Oct 10, 2017
Pyknic added a commit that referenced this issue Oct 10, 2017
@Pyknic Pyknic added the fixed label Oct 10, 2017
@Pyknic Pyknic closed this as completed Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant