@SuppressWarnings("unchecked")
  private static <E extends Enum> E[] getEnumConstantsForClass(Class<E> clazz) {
    E[] returnVal = (E[]) knownEnums.get(clazz);
    if (returnVal == null) {
      returnVal = clazz.getEnumConstants();
      knownEnums.put(clazz, returnVal);
    }
    return returnVal;
  }
gets the enum constants for the given class. {@link Class#getEnumConstants()} uses reflection,
so we keep around the class to enumConstants mapping in the {@link #knownEnums} map

@return enum constants for the given class
geode-core/src/main/java/org/apache/geode/DataSerializer.java