Examples of JexlEngine


Examples of org.apache.commons.jexl2.JexlEngine

   * Creates a new JEXL engine instance.
   *
   * @return a new {@link JexlEngine}
   */
  public static JexlEngine createJexlEngine() {
    return new JexlEngine();
  }
View Full Code Here

Examples of org.apache.commons.jexl2.JexlEngine

    private static JexlEngine jexlEngine;

    private static JexlEngine getEngine() {
        synchronized (LOG) {
            if (jexlEngine == null) {
                jexlEngine = new JexlEngine(new ClassFreeUberspectImpl(null), null, null, null);
                jexlEngine.setClassLoader(new EmptyClassLoader());
                jexlEngine.setCache(512);
                jexlEngine.setLenient(true);
                jexlEngine.setSilent(false);
            }
View Full Code Here

Examples of org.apache.commons.jexl2.JexlEngine

import java.util.Map;

public class ELUtil {
    public static Object invoke(String expression, Map<String, Object> context) {
        JexlEngine jexl = new JexlEngine();
        Expression el = jexl.createExpression(expression);
        JexlContext elContext = new MapContext();
        for (String property : context.keySet()) {
            elContext.set(property, context.get(property));
        }
        return el.evaluate(elContext);
View Full Code Here

Examples of org.apache.commons.jexl2.JexlEngine

   
    public JexlExpressionParser(final Map<String, Object> vars) {
        if (vars == null) {
            throw new IllegalArgumentException("vars: " + vars);
        }
        engine = new JexlEngine();
        context = new MapContext(vars);

        LOGGER.trace("Using variables: {}", vars);
    }
View Full Code Here

Examples of org.apache.commons.jexl2.JexlEngine

  /**
   * Create a new naming strategy using an JEXL expression and the default expression.
   */
  public JexlNamingStrategy() throws JexlException {
    jexl = new JexlEngine();
    this.parsedExpr = jexl.createExpression(DEFAULT_EXPRESSION);
  }
View Full Code Here

Examples of org.apache.commons.jexl2.JexlEngine

   * Create a new naming strategy using an JEXL expression and the given expression.
   *
   * @param expr - the JEXL expression to use to create names.
   */
  public JexlNamingStrategy(String expr) throws JexlException {
    jexl = new JexlEngine();
    this.parsedExpr = jexl.createExpression(expr);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.