public String toString() { return getExpressionString(); } }
public void setValue(Object context, Object value) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { valueExpression.setValue(ctx, value); if (!ctx.isPropertyResolved()) { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable ''" + getBaseVariable() + "' spelled correctly?"); } } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }
private Expression parseExpressionInternal(String expressionString, ParserContext context, boolean template) throws ParserException { Assert.notNull(expressionString, "The expression string to parse is required"); try { ValueExpression expression = parseValueExpression(expressionString, context); ELContextFactory contextFactory = getContextFactory(context.getEvaluationContextType(), expressionString); return new ELExpression(contextFactory, expression); } catch (ELException e) { throw new ParserException(expressionString, e); } }
public Object getValue(Object context) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { Object result = valueExpression.getValue(ctx); if (result == null && !ctx.isPropertyResolved()) { if (getExpressionString().equals("null")) { // special case for handling reserved null keyword return null; } else { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable '" + getBaseVariable() + "' spelled correctly?"); } } return result; } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
private Expression parseExpressionInternal(String expressionString, ParserContext context, boolean template) throws ParserException { Assert.notNull(expressionString, "The expression string to parse is required"); try { ValueExpression expression = parseValueExpression(expressionString, context); ELContextFactory contextFactory = getContextFactory(context.getEvaluationContextType(), expressionString); return new ELExpression(contextFactory, expression); } catch (ELException e) { throw new ParserException(expressionString, e); } }
public Object getValue(Object context) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { Object result = valueExpression.getValue(ctx); if (result == null && !ctx.isPropertyResolved()) { if (getExpressionString().equals("null")) { // special case for handling reserved null keyword return null; } else { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable '" + getBaseVariable() + "' spelled correctly?"); } } return result; } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public String toString() { return getExpressionString(); } }
private Expression parseExpressionInternal(String expressionString, ParserContext context, boolean template) throws ParserException { Assert.notNull(expressionString, "The expression string to parse is required"); try { ValueExpression expression = parseValueExpression(expressionString, context); ELContextFactory contextFactory = getContextFactory(context.getEvaluationContextType(), expressionString); return new ELExpression(contextFactory, expression); } catch (ELException e) { throw new ParserException(expressionString, e); } }
public void setValue(Object context, Object value) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { valueExpression.setValue(ctx, value); if (!ctx.isPropertyResolved()) { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable ''" + getBaseVariable() + "' spelled correctly?"); } } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }
public String toString() { return getExpressionString(); } }
public void setValue(Object context, Object value) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { valueExpression.setValue(ctx, value); if (!ctx.isPropertyResolved()) { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable ''" + getBaseVariable() + "' spelled correctly?"); } } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred setting the value of expression '" + getExpressionString() + "' on context [" + context.getClass() + "] to [" + value + "]", e); } }
private String getBaseVariable() { String expressionString = getExpressionString(); int firstDot = expressionString.indexOf('.'); if (firstDot == -1) { return expressionString; } else { return expressionString.substring(0, firstDot); } }
public Object getValue(Object context) throws EvaluationException { ELContext ctx = elContextFactory.getELContext(context); try { Object result = valueExpression.getValue(ctx); if (result == null && !ctx.isPropertyResolved()) { if (getExpressionString().equals("null")) { // special case for handling reserved null keyword return null; } else { throw new EvaluationException(context.getClass(), getExpressionString(), "The expression '" + getExpressionString() + "' did not resolve... is the base variable ''" + getBaseVariable() + "' spelled correctly?"); } } return result; } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
private String getBaseVariable() { String expressionString = getExpressionString(); int firstDot = expressionString.indexOf('.'); if (firstDot == -1) { return expressionString; } else { return expressionString.substring(0, firstDot); } }
private String getBaseVariable() { String expressionString = getExpressionString(); int firstDot = expressionString.indexOf('.'); if (firstDot == -1) { return expressionString; } else { return expressionString.substring(0, firstDot); } }
public Class<?> getValueType(Object context) { ELContext ctx = elContextFactory.getELContext(context); try { return valueExpression.getType(ctx); } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value type for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public Class<?> getValueType(Object context) { ELContext ctx = elContextFactory.getELContext(context); try { return valueExpression.getType(ctx); } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value type for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }
public Class getValueType(Object context) { ELContext ctx = elContextFactory.getELContext(context); try { return valueExpression.getType(ctx); } catch (javax.el.PropertyNotFoundException e) { throw new PropertyNotFoundException(context.getClass(), getExpressionString(), e); } catch (ELException e) { throw new EvaluationException(context.getClass(), getExpressionString(), "An ELException occurred getting the value type for expression '" + getExpressionString() + "' on context [" + context.getClass() + "]", e); } }