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 to override fluent accessor in generated subclass #11

Closed
sporniket opened this issue Aug 12, 2016 · 3 comments
Closed

Allow to override fluent accessor in generated subclass #11

sporniket opened this issue Aug 12, 2016 · 3 comments
Assignees

Comments

@sporniket
Copy link
Owner

when generating a fluent accessor in a class, and generating a subclass, using the herited fluent accessor cannot be chained to another fluent accessor of the subclass.

allow something like :

<fluent name="xxx" type="yyy">

The name and type MUST obviously match the original definition for the code to be ok.

@sporniket sporniket self-assigned this Aug 12, 2016
@sporniket sporniket added this to the 16.09.00 milestone Sep 13, 2016
@sporniket
Copy link
Owner Author

As a matter of fact, for the fluent accessor to be really usable, the fluent accessor MUST be overriden when generating a class extending another generated class.

It requires that the generator create an index of the generated classes, and that the fluent accessors are being generated separately.

thus the algorithm in pseudo code :

generateFluentAccessors
    foreach(property in properties)
        generateLocalFluentAccessor(property)
    if(extends and getBean(extends))
        getBean(extends).overrideFluentAccessors

overrideFluentAccessors
    foreach(property in properties)
        overrideFluentAccessor(property)
    if(extends and getBean(extends))
        getBean(extends).overrideFluentAccessors

@sporniket
Copy link
Owner Author

requires #16

@sporniket
Copy link
Owner Author

The doclet ExpanderDoclet generate separate builder that supporte all declared fields as well as all inherited fields.

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