Package org.mvel2.integration.impl

Examples of org.mvel2.integration.impl.DefaultLocalVariableResolverFactory


        java.util.List.class);

    ParserContext context = new ParserContext(imports, null, "testfile");
    ExpressionCompiler compiler = new ExpressionCompiler("List list = new ArrayList(); return (list == empty)");
    assertTrue((Boolean) executeExpression(compiler.compile(context),
        new DefaultLocalVariableResolverFactory()));
  }
View Full Code Here


    compiler = new ExpressionCompiler("map = new HashMap(); map.size()");
    s = compiler.compile(ctx);

    assertEquals(0,
        executeExpression(s,
            new DefaultLocalVariableResolverFactory()));
  }
View Full Code Here

    ExpressionCompiler compiler = new ExpressionCompiler(expression);
    Serializable s = compiler.compile();

    assertEquals(0,
        executeExpression(s,
            new DefaultLocalVariableResolverFactory()));

    assertEquals(0,
        MVEL.eval(expression,
            new HashMap()));
  }
View Full Code Here

    Cheesery p1 = new Cheesery("bobbo",
        new Cheese("cheddar",
            15));
    Cheesery p2 = (Cheesery) executeExpression(compiler.compile(ctx),
        new DefaultLocalVariableResolverFactory());

    assertEquals(p1,
        p2);
  }
View Full Code Here

    ExpressionCompiler compiler = new ExpressionCompiler("new Cheesery(\"bobbo\", null)");

    Cheesery p1 = new Cheesery("bobbo",
        null);
    Cheesery p2 = (Cheesery) executeExpression(compiler.compile(ctx),
        new DefaultLocalVariableResolverFactory());

    assertEquals(p1,
        p2);
  }
View Full Code Here

    ExpressionCompiler compiler = new ExpressionCompiler("new Cheesery(\"bobbo\", null)");

    Cheesery p1 = new Cheesery("bobbo",
        null);
    Cheesery p2 = (Cheesery) executeExpression(compiler.compile(ctx),
        new DefaultLocalVariableResolverFactory());

    assertEquals(p1,
        p2);
  }
View Full Code Here

    }
  }

  public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
    ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item);
    ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory));

    Object iterCond = condition.getValue(ctx, thisValue, factory);

    if (type == -1) {
      determineIterType(iterCond.getClass());
View Full Code Here

    return null;
  }

  public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) {
    ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item);
    ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory));

    Object iterCond = MVEL.eval(expr, start, offset, thisValue, factory);

    if (itemType != null && itemType.isArray())
      enforceTypeSafety(itemType, getBaseComponentType(iterCond.getClass()));
View Full Code Here

        }
      }
      return compiledBlock.getValue(thisValue, new FunctionVariableResolverFactory(this, factory, parameters, parms));
    }
    else if (cMode) {
      return compiledBlock.getValue(thisValue, new DefaultLocalVariableResolverFactory(factory, parameters).setNoTilt(true));
    }
    else {
      return compiledBlock.getValue(thisValue, new DefaultLocalVariableResolverFactory(factory,
              parameters).setNoTilt(true));
    }
  }
View Full Code Here

        Collection.class, ((fields & COMPILE_IMMEDIATE) != 0));
  }

  public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
    ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$");
    ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory));

    List list;

    if (constraintEx != null) {
      Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory));
View Full Code Here

TOP

Related Classes of org.mvel2.integration.impl.DefaultLocalVariableResolverFactory

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.