samedi 26 décembre 2015

Get enum.values() from class that containing it

class Clazz{
    public enum MyEnum{
        Hello, World
    }
}

With class Clazz, how do I get MyEnum.values()?

An example of the usage is:

Class unknownClass = getSomeClass();

How to get MyEnum.values() from unknownClass?





Aucun commentaire:

Enregistrer un commentaire