Examples of VariableExpression


Examples of com.google.minijoe.compiler.ast.VariableExpression

          declarationVector.addElement(declaration);
          while (nextToken == Token.OPERATOR_COMMA) {
            readToken(Token.OPERATOR_COMMA);
            declarationVector.addElement(parseVariableDeclaration(false));
          }
          initial = new VariableExpression(Util.vectorToDeclarationArray(declarationVector));

          // fall through

        case 5:
          // 'for' '(' ... ';'
View Full Code Here

Examples of com.puppetlabs.geppetto.pp.VariableExpression

        if(result == null)
          result = defaultCase(theEObject);
        return result;
      }
      case PPPackage.VARIABLE_EXPRESSION: {
        VariableExpression variableExpression = (VariableExpression) theEObject;
        T result = caseVariableExpression(variableExpression);
        if(result == null)
          result = caseExpression(variableExpression);
        if(result == null)
          result = defaultCase(theEObject);
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

   
    if (startValue == null && endValue == null) {
      return new AlwaysTrueExpression();
    }
   
    Expression columnExpr = new VariableExpression(this.columnId);
    Expression startValueExpr = startValue != null ? new ValueExpression(startValue) : null;
    Expression endValueExpr = endValue != null ? new ValueExpression(endValue) : null;
    return buildAction(columnExpr, startValueExpr, endValueExpr);
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

    Object value = filterInfo.get(this.filterInfoKey);
    boolean isNull = this.filterInfoValue == null ? value == null : this.filterInfoValue.equals(value);
    if (!isNull) {
      return new AlwaysTrueExpression();
    }
    return new IsNullExpression(new VariableExpression(this.columnId));
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

  protected Expression buildLeftOperand(Map filterInfo) {
    if (this.columnId == null) {
      throw new RuntimeException("Column Id must be provided");
    }
    return new VariableExpression(this.columnId);
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

    public boolean isActive(Map filterInfo) {
      return true;
    }
   
    public Expression buildExpression(Map filterInfo) {
      return new VariableExpression(this.id);
    }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

  protected Expression buildLeftOperand(Map filterInfo) {
    if (this.columnId == null) {
      throw new RuntimeException("Column Id must be provided");
    }
    return new VariableExpression(this.columnId);
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

  }
 
  public Expression buildExpression(Map filterInfo) {
    validate();
   
    Expression startVar = new VariableExpression(this.startColumnId);
    Expression endVar = new VariableExpression(this.endColumnId);
    Expression startVal = new ValueExpression(filterInfo.get(this.startFilterInfoKey));
    Expression endVal = new ValueExpression(filterInfo.get(this.endFilterInfoKey));
    return buildAction(startVar, endVar, startVal, endVal);
  }
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

      .getLogger(SimpleSqlExpressionTest.class);

  public void testSqlExpressionBuilder() throws ExpressionEvaluationException {
    // build expression
    Expression expr = new AndExpression().add(
        new ComparedEqualsExpression(new VariableExpression("name"),
            new ValueExpression("James Bond"), ComparatorFactory
                .getStringComparator(false, true, null))).add(
        new GreaterThanExpression(new VariableExpression("age"),
            new ValueExpression(new Long(25)))).add(
        new EqualsExpression(new VariableExpression("licenseToKill"),
            new ValueExpression(Boolean.TRUE)));

    // evaluate expression in memory
    Object value = expr.evaluate(new VariableResolver() {
      public Object resolve(Variable variable) {
View Full Code Here

Examples of org.araneaframework.backend.list.memorybased.expression.variable.VariableExpression

  public void testVariableExpression() {
    log.debug("Testing VariableExpression");
    // name
    try {
      new VariableExpression(null).getName();
      fail("VariableExpression's name can't be null");
    } catch (Exception e) {
      // normal
    }
    assertEquals("VariableExpression's name must be 'var1'", "var1",
        new VariableExpression("var1").getName());

    // evaluating
    assertEquals("VariableExpression must return Tom", "Tom",
        new VariableExpression("var").evaluate(new MockVariableResolver("var", "Tom")));
  }
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.