RFR: Generate Java enums
Vivek Narang
duke at openjdk.org
Mon Jul 7 18:17:51 UTC 2025
On Thu, 3 Jul 2025 09:38:18 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> One less radical move could be to give up to the "single namespace" property, and at least group related enum constants together, under a separate generated class. That would mean the Java code would require more "qualifiers" than the associated C code, but with some better separation. Would something like that be enough? Or do you really need these constants to be enum constants (e.g. because you use them in exhaustive switches etc.) ?
Thanks @mcimadamore for your feedback. Yes, if we can at least group related enum constants together under a separate generated class, that will be awesome. Would it be okay if I update this PR to have this change? Please let me know. Thanks!
-------------
PR Comment: https://git.openjdk.org/jextract/pull/284#issuecomment-3046121662
More information about the jextract-dev
mailing list