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
Export static package-private methods annotated with @Export as public in generated class #44
Comments
That sounds good! And we can still generate the normal methods as package-private if wanted? I think that sounds like it should work. |
@talios: 0.9 has been released with this new feature. See doc at https://github.com/derive4j/derive4j/blob/master/README.md#smart-constructors-and-static-methods-export |
Looks good - will update my home project when I get home! |
In the simple case of just wanting to add simple validation ( reusing the same constructor name and arguments) derive4j will generate broken java: // on the generated Links.java
public static Link full(String rel, String href, Map<String, String> properties) {
return Link.full(rel, href, properties);
} I guess we should either fail gracefully rather than generated broken java, or generate the package private method as something like |
Yeah you are right. Will fix this soon! Le 11 août 2016 02:06, "Mark Derricutt" notifications@github.com a écrit :
|
@talios I'm thinking of using the |
This allows to use exclusively the generated class for all static api.
This should also addresses #41.
Also, as bonus, all static no-args methods will be exported with an additional caching of the returned value.
/cc @talios: WDYT?
The text was updated successfully, but these errors were encountered: