Examples of VariableContext


Examples of org.codehaus.preon.el.ctx.VariableContext

    @Before
    public void setUp() throws Exception {
        resolver = EasyMock.createMock(VariableResolver.class);
        defs = EasyMock.createMock(VariableDefinitions.class);
        context = new VariableContext(defs);
    }
View Full Code Here

Examples of org.jaxen.VariableContext

    }

    /** Returns a locally appropriate Jaxen context given a node. */
    private Context getLocalContext(Node n) {
  // set up instance-specific contexts
        VariableContext vc = new JstlVariableContext();
        ContextSupport cs = new ContextSupport(nc, fc, vc, dn);
        Context c = new Context(cs);
        List l = new ArrayList(1);
        l.add(n);
        c.setNodeSet(l);
View Full Code Here

Examples of org.jwall.web.audit.util.VariableContext

      log.info("Found priority {}", priority);

      Map<String, String> parameter = objectFactory.getAttributes(node);
      Map<String, String> expanded = new HashMap<String, String>();
      VariableContext ctx = new VariableContext(System.getProperties());
      for (String key : parameter.keySet()) {
        expanded.put(key, ctx.expand(parameter.get(key)));
      }

      log.debug("Creating object from '{}' with parameters: {}",
          node.getNodeName(), expanded);
      Object o = objectFactory.create(node.getNodeName(), expanded, node);
View Full Code Here

Examples of org.noname.designer.core.interfaces.VariableContext

   * @param OK
   *            | CONTINUE | BREAK | RETURN | THROW | RETURN_VALUE
   */
  @Override
  public int evaluate(EvaluationContext context) {
    VariableContext varCtx = new VariableContext();
    context.peek().push(varCtx);
    List statements = block.statements();
    try {
      if (statements != null && !statements.isEmpty()) {
        for (int i = 0; i < statements.size(); i++) {
View Full Code Here

Examples of org.noname.designer.core.interfaces.VariableContext

  private EvaluationContext createContext() {
    Object thisObj = createObject(componentType);
    EvaluationContext context = new EvaluationContext(thisObj);
    FrameContext frame = new FrameContext();
    context.push(frame);
    VariableContext arguments = new VariableContext();
    frame.push(arguments);
    return context;
  }
View Full Code Here

Examples of org.noname.designer.core.interfaces.VariableContext

   */
  @Override
  public int evaluate(EvaluationContext context) {
    Expression expression = invocation.getExpression();
    FrameContext frame = context.peek();
    VariableContext ctx = frame.peek();
    Stack<Object> stack = ctx.getStack();
    if (expression != null && !(expression instanceof ThisExpression)) {
      IEvaluator evaluator = (IEvaluator) Platform.getAdapterManager()
          .getAdapter(expression, IEvaluator.class);
      int result = evaluator.evaluate(context);
      switch (result) {
View Full Code Here

Examples of org.noname.designer.core.interfaces.VariableContext

  private int evaluateMethodInvocation(EvaluationContext context,
      MethodDeclaration mi) {
    FrameContext frame = new FrameContext();
    context.push(frame);
    VariableContext arguments = new VariableContext();
    frame.push(arguments);
    IEvaluator evaluator = (IEvaluator) Platform.getAdapterManager()
        .getAdapter(mi, IEvaluator.class);
    int ret = evaluator.evaluate(context);
    frame = context.popup();
    Object result = frame.getResult();
    switch (ret) {
    case THROW:
      context.peek().setResult(result);
      return THROW;
    case RETURN:
      return OK;
    }
    frame = context.peek();
    VariableContext varCtx = frame.peek();
    Stack<Object> stack = varCtx.getStack();
    stack.addElement(result);
    return OK;
  }
View Full Code Here

Examples of org.teiid.query.sql.util.VariableContext

        CommandContext context = createCommandContext();
        context.setMetadata(metadata);       
        ProcessorPlan plan = helpGetPlan(command, metadata, capFinder, context);
       
        // Collect reference, set value
        VariableContext vc = new VariableContext();
        Iterator<?> valIter = values.iterator();
        for (Reference ref : ReferenceCollectorVisitor.getReferences(command)) {
            vc.setGlobalValue(ref.getContextSymbol(),  valIter.next()); //$NON-NLS-1$
    }
        context.setVariableContext(vc);
        // Run query
        helpProcess(plan, context, dataManager, expected);
  }   
View Full Code Here

Examples of org.teiid.query.sql.util.VariableContext

                       
                        projectNode.addChild(batchNode);
                        // Add a new RelationalPlan that represents the plan for this batch.
                        childPlans.add(new RelationalPlan(projectNode));
                        if (planContexts != null) {
                          planContexts.add(new VariableContext());
                      }
                        // Skip those commands that were added to this batch
                        commandIndex += batch.size() - 1;
                        commandWasBatched = true;
                    }
View Full Code Here

Examples of org.teiid.query.sql.util.VariableContext

        if (this.params != null) {
            for (Map.Entry<ElementSymbol, Expression> entry : this.params.entrySet()) {
                ElementSymbol param = entry.getKey();
                Expression expr = entry.getValue();
               
                VariableContext context = getCurrentVariableContext();
                Object value = this.evaluateExpression(expr);
   
                //check constraint
                checkNotNull(param, value);
                setParameterValue(param, context, value);
            }
        }
        if (this.implicitParams != null) {
          for (Map.Entry<ElementSymbol, Reference> entry : this.implicitParams.entrySet()) {
                VariableContext context = getCurrentVariableContext();
                Object value = this.evaluateExpression(entry.getValue());
                context.setValue(entry.getKey(), value);
        }
        }
        tempTableStore = new TempTableStore(getContext().getConnectionID());
        getContext().setTempTableStore(tempTableStore);
      }
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.