We can generate Frege code for inner classes. The class name that is input to the native-gen tool is the name returned by Class.getName
. For the Animation.Status
enum, it is javafx.animation.Animation$Status
.
$ java -jar native-gen-1.0-SNAPSHOT.jar
Enter class name: javafx.animation.Animation$Status
data Animation_Status = pure native javafx.animation.Animation.Status where
pure native paused "javafx.animation.Animation.Status.PAUSED" :: Animation_Status
pure native running "javafx.animation.Animation.Status.RUNNING" :: Animation_Status
pure native stopped "javafx.animation.Animation.Status.STOPPED" :: Animation_Status
pure native valueOf "javafx.animation.Animation.Status.valueOf" :: String -> Animation_Status
native values "javafx.animation.Animation.Status.values" :: () -> STMutable s (JArray Animation_Status)
derive Serializable Animation_Status
By the way, the native-gen
version I am working on currently can generate Frege code for an entire Java package and its subpackages recursively. We could just give the root package javafx
and it would create Frege modules for all the classes in all its subpackages. I will release this hopefully by the end of this week.