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

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


      }
    };

    MVELRuntime.setThreadDebugger(testDebugger);

    assertEquals(10, MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertTrue("did not break at line 7", breaked.contains(7));
  }
View Full Code Here


      }
    };

    MVELRuntime.setThreadDebugger(testDebugger);

    assertEquals(1, MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertTrue("Debugger did not break at line 9", linesEncountered.contains(9));
  }
View Full Code Here

      }
    };

    MVELRuntime.setThreadDebugger(testDebugger);

    assertEquals(1, MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertEquals("did not break at expected lines", Make.Set.<Integer>$()._(6)._(8)._(9)._(10)._(), breaked);
  }
View Full Code Here

    };


    MVELRuntime.setThreadDebugger(testDebugger);

    assertEquals("bar", MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertTrue("did not fire before", result.firedBefore);
    assertTrue("did not fire after", result.firedAfter);
    assertEquals("did not break at expected points", Make.Set.<Integer>$()._(3)._(4)._(5)._(), breaked);
  }
View Full Code Here

    MVELRuntime.setThreadDebugger(testDebugger);

    System.out.println("\n==RUN==\n");

    assertEquals("bar", MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
    assertTrue("did not break at line 1", breaked.contains(1));

  }
View Full Code Here

    MVELRuntime.registerBreakpoint("test.mv", 3);

    System.out.println(DebugTools.decompile(compiled
    ));

    Assert.assertEquals("FOOBAR!", MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(vars)));
  }
View Full Code Here

      pCtx.popVariableScope();
    }
  }

  public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
    VariableResolverFactory ctxFactory = new MapVariableResolverFactory(new HashMap(0), factory);
    while (!(Boolean) condition.getValue(ctx, thisValue, factory)) {
      compiledBlock.getValue(ctx, thisValue, ctxFactory);
    }

    return null;
View Full Code Here

    return null;
  }

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

    while (!(Boolean) condition.getValue(ctx, thisValue, factory)) {
      compiledBlock.getValue(ctx, thisValue, ctxFactory);
    }
    return null;
View Full Code Here

      pCtx.popVariableScope();
    }
  }

  public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
    VariableResolverFactory ctxFactory = indexAlloc ? factory : new MapVariableResolverFactory(new HashMap<String, Object>(1), factory);
    Object v;
    for (initializer.getValue(ctx, thisValue, ctxFactory); (Boolean) condition.getValue(ctx, thisValue, ctxFactory); after.getValue(ctx, thisValue, ctxFactory)) {
      v = compiledBlock.getValue(ctx, thisValue, ctxFactory);
      if (ctxFactory.tiltFlag()) return v;
    }
View Full Code Here

    return null;
  }

  public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) {
    Object v;
    for (initializer.getValue(ctx, thisValue, factory = new MapVariableResolverFactory(new HashMap<String, Object>(1), factory)); (Boolean) condition.getValue(ctx, thisValue, factory); after.getValue(ctx, thisValue, factory)) {
      v = compiledBlock.getValue(ctx, thisValue, factory);
      if (factory.tiltFlag()) return v;
    }

    return null;
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.