I\'ve got the class object for an enum (I have a Class extends Enum>) and I need to get a list of the enumerated values represented by this enum. The
Class extends Enum>
If you know the name of the value you need:
Class extends Enum> klass = ... Enum> x = Enum.valueOf(klass, "NAME");
If you don't, you can get an array of them by (as Tom got to first):
klass.getEnumConstants();