Enum-aware ServiceLoader implementation?
问题 I would like to be able to indicate an enum type as an interface implementation and then load all enums as separate instances/implementations of the interface via the ServiceLoader API. An example of this use case would be to allow downstream users of my API to specify custom values, but provide an enum with standard/common implementations. My interface only requires a String name() , so any enum implements it already. For example, the CopyOption interface in the Java NIO APIs, with the