-
Notifications
You must be signed in to change notification settings - Fork 34
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
add direct enum ref in JCodemodel #68
Comments
Will review it after my vacation :) looks good |
Enjoy the vacation :) |
maybe instead of enumRef, overload the lit() method ? At first I searched in the lit because I thought it would be there. |
I now added a method |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I assume it is okay. Part of v3.2.4 |
sorry if this is already present, did not find it.
I already have this code in a common class :
I want to use JCodeModel to create the class B:
I create the definedclass bclass, create the constructor, but when I want to set super(enum1) I need to call
JExpr.enumConstantRef(cm.ref(MyEnum.class), enum1.name())
I think it would be easier to add an enumRef in JCodeModel that allow to refer to an enum constant more easily.
eg
(did not test this code, maybe the idea is bad - it compiles but :P )
The text was updated successfully, but these errors were encountered: