public String toString() { return getExpressionString(); }
public String toString() { return getExpressionString(); }
@SuppressWarnings("deprecation") public Class<?> getValueType(Object rootObject) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } return expression.getValueType(context); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } throw new EvaluationException(rootObject.getClass(), getExpressionString(), "An ELException occurred getting the value type for expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "]", e); } }
@SuppressWarnings("deprecation") public Class<?> getValueType(Object rootObject) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } return expression.getValueType(context); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } throw new EvaluationException(rootObject.getClass(), getExpressionString(), "An ELException occurred getting the value type for expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "]", e); } }
@SuppressWarnings("deprecation") public void setValue(Object rootObject, Object value) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } expression.setValue(context, value); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_WRITABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } if (e.getMessageCode().equals(SpelMessage.EXCEPTION_DURING_PROPERTY_WRITE)) { throw new ValueCoercionException(rootObject.getClass(), getExpressionString(), value, expectedType, e); } throw new EvaluationException(rootObject.getClass(), getExpressionString(), "An ELException occurred setting the value of expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "] to [" + value + "]", e); } }
@SuppressWarnings("deprecation") public void setValue(Object rootObject, Object value) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } expression.setValue(context, value); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_WRITABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } if (e.getMessageCode().equals(SpelMessage.EXCEPTION_DURING_PROPERTY_WRITE)) { throw new ValueCoercionException(rootObject.getClass(), getExpressionString(), value, expectedType, e); } throw new EvaluationException(rootObject.getClass(), getExpressionString(), "An ELException occurred setting the value of expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "] to [" + value + "]", e); } }
@SuppressWarnings("deprecation") public Object getValue(Object rootObject) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } return expression.getValue(context, expectedType); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } if (e.getMessageCode().equals(SpelMessage.TYPE_CONVERSION_ERROR)) { throw new ValueCoercionException(rootObject.getClass(), getExpressionString(), null, expectedType, e); } throw new EvaluationException(rootObject.getClass(), expression.getExpressionString(), "An ELException occurred getting the value for expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "]", e); } }
@SuppressWarnings("deprecation") public Object getValue(Object rootObject) throws EvaluationException { try { EvaluationContext context = contextFactory.createContext(rootObject); if (context instanceof StandardEvaluationContext) { extendEvaluationContext((StandardEvaluationContext) context); } return expression.getValue(context, expectedType); } catch (SpelEvaluationException e) { if (e.getMessageCode().equals(SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE)) { throw new PropertyNotFoundException(rootObject.getClass(), getExpressionString(), e); } if (e.getMessageCode().equals(SpelMessage.TYPE_CONVERSION_ERROR)) { throw new ValueCoercionException(rootObject.getClass(), getExpressionString(), null, expectedType, e); } throw new EvaluationException(rootObject.getClass(), expression.getExpressionString(), "An ELException occurred getting the value for expression '" + getExpressionString() + "' on context [" + rootObject.getClass() + "]", e); } }