Simn / genjvm

13 stars 1 forks source link

enums again #45

Closed Simn closed 5 years ago

Simn commented 5 years ago

Something I didn't realize is that genjava allows using java-native enums as Haxe enums. The only way to support that would be to make our enums extend java.lang.Enum so there's a common API.

This isn't entirely free because the java.lang.Enum constructor wants a string of the enum name. It would also mean dropping (parts of) the annotation-based reflection approach.

Simn commented 5 years ago

Oh there's also problems with name clashes between haxe enum argument names and the public API of java.lang.Enum. We should however be able to map that away because there's no Haxe API that's based on enum arg names.

Simn commented 5 years ago

This is done, will deal with the clash issue in #50.