How to extend static methods for enums implementing an interface?
问题 This question is closely related to my previous question on SO about using interface with enums. Essentially, I have a bunch of enums that are closely related, and they all implement a common interface. The interface is called Sections and the enums are called SectionA , SectionB , etc. I have other classes which have fields like List<Sections> and Map<Sections, String> . Now, to populate these fields, I would like to have access to valueOf(String) , i.e. I would like to be able to say