@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } }
/** * {@inheritDoc} */ @Override public <T> void setVariable(String key, T value, Class<? extends T> type) { ValueExpression valueExpression = expressionFactory.createValueExpression(value, type); VariableMapper variableMapper = elContext.getVariableMapper(); variableMapper.setVariable(key, valueExpression); }
/** * Construct a StandardELContext from another ELContext. * @param context The ELContext that acts as a delegate in most cases */ public StandardELContext(ELContext context) { this.delegate = context; // Copy all attributes except map and resolved CompositeELResolver elr = new CompositeELResolver(); elr.add(new BeanNameELResolver(new LocalBeanNameResolver())); customResolvers = new CompositeELResolver(); elr.add(customResolvers); elr.add(context.getELResolver()); elResolver = elr; functionMapper = context.getFunctionMapper(); variableMapper = context.getVariableMapper(); setLocale(context.getLocale()); }
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } };
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); }
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } };
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } };
@Override public VariableMapper getVariableMapper() { return ctx.getVariableMapper(); }
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } }
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } };
@Override public VariableMapper getVariableMapper() { return wrapped.getVariableMapper(); } }
@Override public VariableMapper getVariableMapper() { return delegate.getVariableMapper(); } }
@Override public VariableMapper getVariableMapper() { return context.getVariableMapper(); } };
/** * {@inheritDoc} */ @Override public <T> void setVariable(String key, T value, Class<? extends T> type) { ValueExpression valueExpression = expressionFactory.createValueExpression(value, type); VariableMapper variableMapper = elContext.getVariableMapper(); variableMapper.setVariable(key, valueExpression); }
public <T> void setVariable(String key, T value, Class<? extends T> type) { VariableMapper variableMapper = context.getVariableMapper(); ValueExpression valueExpression = factory.createValueExpression(value, type); variableMapper.setVariable(key, valueExpression); }
@Override public final TreeMethodExpression createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) { return new TreeMethodExpression(store, context.getFunctionMapper(), context.getVariableMapper(), converter, expression, expectedReturnType, expectedParamTypes); } }
@Override public ELContext getELContext() { ELContext ctx = new ExpressionContext(); ExpressionFactory ef = getApplication().getExpressionFactory(); for (Map.Entry<String, Object> var : variables.entrySet()) { ctx.getVariableMapper().setVariable(var.getKey(), ef.createValueExpression(var.getValue(), Object.class)); } return ctx; }
@Override public final TreeValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType) { return new TreeValueExpression(store, context.getFunctionMapper(), context.getVariableMapper(), converter, expression, expectedType); }
public ExpressionBuilder(String expression, ELContext ctx) throws ELException { this.expression = expression; FunctionMapper ctxFn = ctx.getFunctionMapper(); VariableMapper ctxVar = ctx.getVariableMapper(); if (ctxFn != null) { this.fnMapper = new FunctionMapperFactory(ctxFn); } if (ctxVar != null) { this.varMapper = new VariableMapperFactory(ctxVar); } }
public ExpressionBuilder(String expression, ELContext ctx) throws ELException { this.expression = expression; FunctionMapper ctxFn = ctx.getFunctionMapper(); VariableMapper ctxVar = ctx.getVariableMapper(); if (ctxFn != null) { this.fnMapper = new FunctionMapperFactory(ctxFn); } if (ctxVar != null) { this.varMapper = new VariableMapperFactory(ctxVar); } }