julienrf.enum
The companion object contains the machinery to automatically derive the values of a sealed trait extended by case objects only.
Basically, the derivation process is the following:
A
List
The first step is the hard part of this process and is actually achieved by shapeless (using macros).
sealed trait Foo object Foo { case object Bar extends Foo case object Baz extends Foo val values = Values[Foo] }
All the possible values of A
The companion object contains the machinery to automatically derive the values of a sealed trait extended by case objects only.
Basically, the derivation process is the following:
A
;List
;List
contains all the possible values of typeA
.The first step is the hard part of this process and is actually achieved by shapeless (using macros).