Package org.elasticsearch.common.mvel2.integration.impl

Examples of org.elasticsearch.common.mvel2.integration.impl.MapVariableResolverFactory


    return null;
  }

  public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) {
    VariableResolverFactory lc = new MapVariableResolverFactory(new HashMap(0), factory);

    do {
      compiledBlock.getValue(ctx, thisValue, lc);
    }
    while (!(Boolean) condition.getValue(ctx, thisValue, lc));
View Full Code Here


    pCtx.addVariable(name, Function.class);
  }

  public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
    PrototypalFunctionInstance instance = new PrototypalFunctionInstance(this, new MapVariableResolverFactory());
    if (name != null) {
      if (!factory.isIndexedFactory() && factory.isResolveable(name))
        throw new CompileException("duplicate function: " + name, expr, start);

      factory.createVariable(name, instance);
View Full Code Here

    }
    return instance;
  }

  public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) {
    PrototypalFunctionInstance instance = new PrototypalFunctionInstance(this, new MapVariableResolverFactory());
    if (name != null) {
      if (!factory.isIndexedFactory() && factory.isResolveable(name))
        throw new CompileException("duplicate function: " + name, expr, start);
      factory.createVariable(name, instance);
    }
View Full Code Here

        throw new TemplateRuntimeError("cannot iterate object type: " + o.getClass().getName());
      }
    }

    Map<String, Object> locals = new HashMap<String, Object>();
    MapVariableResolverFactory localFactory = new MapVariableResolverFactory(locals, factory);

    int iterate = iters.length;

    while (true) {
      for (int i = 0; i < iters.length; i++) {
View Full Code Here

  public static Object eval(InputStream instream, Object ctx, VariableResolverFactory vars) {
    return eval(instream, ctx, vars);
  }

  public static Object eval(InputStream instream, Object ctx, Map vars) {
    return eval(instream, ctx, new MapVariableResolverFactory(vars), null);
  }
View Full Code Here

  public static Object eval(InputStream instream, Object ctx, Map vars) {
    return eval(instream, ctx, new MapVariableResolverFactory(vars), null);
  }

  public static Object eval(InputStream instream, Object ctx, Map vars, TemplateRegistry registry) {
    return execute(compileTemplate(TemplateTools.readStream(instream)), ctx, new MapVariableResolverFactory(vars), registry);
  }
View Full Code Here

  public static void eval(InputStream instream, Object ctx, VariableResolverFactory vars, TemplateRegistry register, OutputStream stream) {
    execute(compileTemplate(TemplateTools.readStream(instream)), ctx, vars, register, stream);
  }

  public static Object eval(String template, Map vars) {
    return execute(compileTemplate(template), null, new MapVariableResolverFactory(vars));
  }
View Full Code Here

  public static Object eval(String template, Map vars) {
    return execute(compileTemplate(template), null, new MapVariableResolverFactory(vars));
  }

  public static void eval(String template, Map vars, OutputStream stream) {
    execute(compileTemplate(template), null, new MapVariableResolverFactory(vars), null, stream);
  }
View Full Code Here

  public static Object eval(String template, Object ctx) {
    return execute(compileTemplate(template), ctx);
  }

  public static Object eval(String template, Object ctx, Map vars) {
    return execute(compileTemplate(template), ctx, new MapVariableResolverFactory(vars));
  }
View Full Code Here

  public static Object eval(String template, Object ctx, Map vars) {
    return execute(compileTemplate(template), ctx, new MapVariableResolverFactory(vars));
  }

  public static void eval(String template, Object ctx, Map vars, OutputStream stream) {
    execute(compileTemplate(template), ctx, new MapVariableResolverFactory(vars), null, stream);
  }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.mvel2.integration.impl.MapVariableResolverFactory

Copyright © 2018 www.massapicom. 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.