Package org.mvel2.integration.impl

Examples of org.mvel2.integration.impl.DefaultLocalVariableResolverFactory


    }
   
    public VariableResolverFactory createFactory() {
        Object[] vals = new Object[inputIdentifiers.length];

        VariableResolverFactory factory = varModel.createFactory( vals );
        DroolsVarFactory df = new  DroolsVarFactory();
        factory.setNextFactory( df );      
        return factory;
    }
View Full Code Here


                                              final Object rightObject,
                                              final LeftTuple tuples,
                                              final Object[] otherVars,
                                              final InternalWorkingMemory workingMemory,
                                              final GlobalResolver globals) {
        VariableResolverFactory factory = createFactory();
        updateFactory(knowledgeHelper, prevDecl, rule, rightObject, tuples, otherVars, workingMemory, globals, factory);
        return factory;
    }
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

    return list;
  }

  public Object getReducedValue(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) {
      Object x = dataEx.getValue(ctx, thisValue, factory);
View Full Code Here

    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 1);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 3);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 7);

    VariableResolverFactory factory = new DefaultLocalVariableResolverFactory();
    MVEL.executeDebugger(compexpr, null, factory);

    System.out.println(a1);
    System.out.println(a4);
    System.out.println(count);
View Full Code Here

    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 2);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 3);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 4);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 5);

    VariableResolverFactory factory = new DefaultLocalVariableResolverFactory();
    MVEL.executeDebugger(compexpr, null, factory);

    System.out.println(count);
    assertEquals(5, count);
  }
View Full Code Here

            new ExpressionCompiler("message='Hello';b=7;\nSystem.out.println(message + ';' + b);\n"
                    + "System.out.println(message + ';' + b); b");

    assertEquals(7,
            executeExpression(compiler.compile(ctx),
                    new DefaultLocalVariableResolverFactory()));
  }
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 StackDemarcResolverFactory(new FunctionVariableResolverFactory(this, factory, parameters, parms)));
    }
    else if (compiledMode) {
      return compiledBlock.getValue(thisValue,
          new StackDemarcResolverFactory(new DefaultLocalVariableResolverFactory(factory, parameters)));
    }
    else {
      return compiledBlock.getValue(thisValue,
          new StackDemarcResolverFactory(new DefaultLocalVariableResolverFactory(factory, parameters)));
    }

  }
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.