You mean you want to index out all children of a sealed class? Then I think this post will help you. Make sure that the implementation assumes that all the children of the class are directly-inheriting case objects. Also scala.Enumeration can be used if those children need not specific implementation.


Short answer: No. See also this question

According to this old post on scala-lang the best way to achieve interoperability is to declare the enum in Java. I haven't found any reason to believe that has changed since then.

Using the different Scala variants will make your Java code look bad, and using Java enums from Scala is straight forward.

Related Query

More Query from same tag