public Class<?> getValueType(Object context) {
try {
// OGNL has no native way to get this information
return new BeanWrapperImpl(context).getPropertyType(expressionString);
} catch (InvalidPropertyException e) {
throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e);
} catch (BeansException e) {
throw new EvaluationException(context.getClass(), getExpressionString(),
"An BeansException occurred getting the value type for expression '" + getExpressionString()
+ "' on context [" + context.getClass() + "]", e);
}