return value < 0 ? null : paramType.getEnumConstants()[value];
}
@Override public OutboundVariable convertOutbound(Object data, OutboundContext outctx) {
Class<?> enumClass = data.getClass();
if (!enumClass.isEnum()) throw new ConversionException(enumClass);
int pos = -1;
Object[] enums = enumClass.getEnumConstants();
for (int index = 0; index < enums.length; index++)
if (enums[index] == data)
pos = index;
if (pos < 0) throw new ConversionException(enumClass);
return new NonNestedOutboundVariable("{position: " + pos + ", displayable: \'" + messageResolver.getMessage(enumClass.getSimpleName() + "." + ((Enum<?>) data).name(), null, WebContextLocale.getActiveLocale()) + "\'}");
}