Here you can find the source of getEnumNames(Class extends Enum>> e)
public static String[] getEnumNames(Class<? extends Enum<?>> e)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static String[] getEnumNames(Class<? extends Enum<?>> e) { return Arrays.toString(e.getEnumConstants()).replaceAll("\\[|]", "").split(", "); }/*from w ww. j av a 2s . c o m*/ }