protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException { BeanWrapperExpression expression = new BeanWrapperExpression(expressionString, conversionService); expression.setAutoGrowNestedPaths(autoGrowNestedPaths); expression.setAutoGrowCollectionLimit(autoGrowCollectionLimit); return expression; } }
public Class<?> getValueType(Object context) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); return beanWrapper.getPropertyType(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, 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); } }
protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException { return new BeanWrapperExpression(expressionString, conversionService); } }
public Class<?> getValueType(Object context) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); return beanWrapper.getPropertyType(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, 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); } }
protected Expression doParseExpression(String expressionString, ParserContext context) throws ParserException { BeanWrapperExpression expression = new BeanWrapperExpression(expressionString, conversionService); expression.setAutoGrowNestedPaths(autoGrowNestedPaths); expression.setAutoGrowCollectionLimit(autoGrowCollectionLimit); return expression; } }
public Object getValue(Object context) throws EvaluationException { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); return beanWrapper.getPropertyValue(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public Class getValueType(Object context) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); return beanWrapper.getPropertyType(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, 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); } }
public Object getValue(Object context) throws EvaluationException { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths); beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit); return beanWrapper.getPropertyValue(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public Object getValue(Object context) throws EvaluationException { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths); beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit); return beanWrapper.getPropertyValue(expression); } catch (NotReadablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public void setValue(Object context, Object value) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths); beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit); beanWrapper.setConversionService(conversionService.getDelegateConversionService()); beanWrapper.setPropertyValue(expression, value); } catch (NotWritablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (TypeMismatchException e) { throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }
public void setValue(Object context, Object value) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); beanWrapper.setAutoGrowNestedPaths(autoGrowNestedPaths); beanWrapper.setAutoGrowCollectionLimit(autoGrowCollectionLimit); beanWrapper.setConversionService(conversionService.getDelegateConversionService()); beanWrapper.setPropertyValue(expression, value); } catch (NotWritablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (TypeMismatchException e) { throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }
public void setValue(Object context, Object value) { try { BeanWrapperImpl beanWrapper = new BeanWrapperImpl(context); Set converters = conversionService.getConversionExecutors(String.class); for (Iterator it = converters.iterator(); it.hasNext();) { ConversionExecutor converter = (ConversionExecutor) it.next(); beanWrapper.registerCustomEditor(converter.getTargetClass(), new PropertyEditorConverter(converter)); } beanWrapper.setPropertyValue(expression, value); } catch (NotWritablePropertyException e) { throw new PropertyNotFoundException(context.getClass(), expression, e); } catch (TypeMismatchException e) { throw new ValueCoercionException(context.getClass(), expression, value, e.getRequiredType(), e); } catch (BeansException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "A BeansException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }