public static <S extends Enum<S>> Enum valueOf(Class<S> etype, String s) {
public static <S extends Enum<S>> S valueOf(Class<S> etype, String s) {
  public static <S extends Enum<S>> Enum valueOf(Class<S> etype, String s) {        if (etype == null || s == null)            throw new NullPointerException();        try {            return (S) etype.getDeclaredField(s).get(null);        } catch (NoSuchFieldException exception) {            throw new IllegalArgumentException(s);        } catch (IllegalAccessException exception) {            throw new Error("Unable to access Enum class");        }    }