else if (clazz.isEnum()) {
else if (Enum.class.isAssignableFrom(clazz)) {
    public Formatter getFormatter(Class clazz, Locale locale, String formatType, String formatPattern) {        Formatter formatter = null;        // Figure out if we have a type we can format        if (Date.class.isAssignableFrom(clazz)) {            formatter = new DateFormatter();            formatter.setFormatType(formatType);            formatter.setFormatPattern(formatPattern);            formatter.setLocale(locale);            formatter.init();            return formatter;        }        else if (Number.class.isAssignableFrom(clazz)) {            formatter = new NumberFormatter();            formatter.setFormatType(formatType);            formatter.setFormatPattern(formatPattern);            formatter.setLocale(locale);            formatter.init();            return formatter;        }        else if (clazz.isEnum()) {            formatter = new EnumFormatter();            formatter.init();            return formatter;        }        else {            return null;        }    }