class EnumConverter implements Converter<E> {

	@SuppressWarnings("unchecked")
	@Override
	public E fromString(String string) throws ConverterException {

		Class<E> type = (Class<E>) property.meta().type;

		try {
			return Enum.valueOf(type, string);
		} catch (IllegalArgumentException ex) {
			if (resId == -1) {
				throw ex;
			} else {
				throw new ConverterException(resId);
			}
		}
	}

	public  EnumConverter(Property<E> property);
	public  EnumConverter(Property<E> property, int resId);

}