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

Injecting enums #16

Open
newk5 opened this issue Jun 19, 2018 · 1 comment
Open

Injecting enums #16

newk5 opened this issue Jun 19, 2018 · 1 comment

Comments

@newk5
Copy link

newk5 commented Jun 19, 2018

Are enums supported? Tried to inject one with .injectClass but always turned out null. If they're not supported, are there plans to support it in the future? Would be really handy for some of my use cases.

@caer
Copy link
Member

caer commented Jun 22, 2018

Hi @newk5 ! Enum fields are not currently supported due to a shortcoming in our API (we do not register properties on injected classes). This is a good future enhancement that we will add to the TODO-list.

For now, you could use the ordinal() method in conjunction with integer passing as a work-around for sharing enum constant information with the Java side...although it is not perfect.

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

2 participants