Examples of accept()


Examples of com.odiago.flumebase.parser.BinExpr.accept()

  public void testBasicBinop() throws VisitException {
    Expr binopExpr = new BinExpr(
      new ConstExpr(Type.getPrimitive(Type.TypeName.INT), Integer.valueOf(2)),
      BinOp.Add, new ConstExpr(Type.getPrimitive(Type.TypeName.INT), Integer.valueOf(3)));
    TypeChecker tc = new TypeChecker(new HashSymbolTable());
    binopExpr.accept(tc);
  }

  @Test
  public void testNestedBinop() throws VisitException {
    Expr binopExpr = new BinExpr(
View Full Code Here

Examples of com.odiago.flumebase.parser.Expr.accept()

    after(s, s.getSource());

    Expr where = s.getWhereConditions();
    if (null != where) {
      before(s, where);
      where.accept(this);
      after(s, where);
    }

    GroupBy groupBy = s.getGroupBy();
    if (null != groupBy) {
View Full Code Here

Examples of com.odiago.flumebase.parser.GroupBy.accept()

    }

    GroupBy groupBy = s.getGroupBy();
    if (null != groupBy) {
      before(s, groupBy);
      groupBy.accept(this);
      after(s, groupBy);
    }

    Expr aggregateOver = s.getWindowOver();
    if (null != aggregateOver) {
View Full Code Here

Examples of com.odiago.flumebase.parser.RangeSpec.accept()

    spec.accept(this);
  }

  protected void visit(WindowSpec spec) throws VisitException {
    RangeSpec range = spec.getRangeSpec();
    range.accept(this);
  }

  protected void visit(RangeSpec spec) throws VisitException {
    // Expressions within a range specification for a window must be constant,
    // and numeric.
View Full Code Here

Examples of com.odiago.flumebase.parser.SQLStatement.accept()

      if (null == stmt) {
        msgBuilder.append("(Could not parse command)");
        return new QuerySubmitResponse(msgBuilder.toString(), null);
      }

      stmt.accept(new AssignFieldLabelsVisitor());
      stmt.accept(new CountStarVisitor()); // Must be after assign labels, before TC.
      stmt.accept(new TypeChecker(mRootSymbolTable));
      stmt.accept(new ReplaceWindows()); // Must be after TC.
      stmt.accept(new JoinKeyVisitor()); // Must be after TC.
      stmt.accept(new JoinNameVisitor());
View Full Code Here

Examples of com.odiago.flumebase.parser.WindowDef.accept()

    List<WindowDef> windowDefs = s.getWindowDefs();
    if (null != windowDefs) {
      for (int i = 0; i < windowDefs.size(); i++) {
        WindowDef def = windowDefs.get(i);
        before(s, def);
        def.accept(this);
        after(s, def);
      }
    }
  }
View Full Code Here

Examples of com.odiago.flumebase.parser.WindowSpec.accept()

    // Nothing to do.
  }

  protected void visit(WindowDef def) throws VisitException {
    WindowSpec spec = def.getWindowSpec();
    spec.accept(this);
  }

  protected void visit(WindowSpec spec) throws VisitException {
    RangeSpec range = spec.getRangeSpec();
    range.accept(this);
View Full Code Here

Examples of com.onpositive.gae.profiler.SnapshotFilter.accept()

    return new IFilter() {

      public boolean accept(Object o) {
        SnapshotFilter modelFilter = data.getModelFilter();
        if (modelFilter != null) {
          return modelFilter.accept((ITrace) o);
        }
        return true;
      }

      public Point match(String text) {
View Full Code Here

Examples of com.opengamma.analytics.financial.commodity.derivative.AgricultureFutureOption.accept()

    final AgricultureFutureDefinition definition = new AgricultureFutureDefinition(EXPIRY_DATE, AN_UNDERLYING, UNIT_AMOUNT, null, null, AMOUNT, "tonnes",
        SettlementType.CASH, 0, Currency.GBP, SETTLEMENT_DATE);
    final AgricultureFuture future = definition.toDerivative(A_DATE);
    final AgricultureFutureOption option = new AgricultureFutureOption(EXPIRY, future, STRIKE, EXERCISE, true);
    final double pv = option.accept(PRICER, MARKET);
    assertEquals(answer, pv * option.getUnderlying().getUnitAmount(), TOLERANCE);
  }

  @Test
  public void testEnergyFutureOption() {
View Full Code Here

Examples of com.opengamma.analytics.financial.commodity.derivative.EnergyFutureOption.accept()

    final EnergyFutureDefinition definition = new EnergyFutureDefinition(EXPIRY_DATE, AN_UNDERLYING, UNIT_AMOUNT, null, null, AMOUNT, "tonnes", SettlementType.CASH, 0,
        Currency.GBP, SETTLEMENT_DATE);
    final EnergyFuture future = definition.toDerivative(A_DATE);
    final EnergyFutureOption option = new EnergyFutureOption(EXPIRY, future, STRIKE, EXERCISE, true);
    final double pv = option.accept(PRICER, MARKET);
    assertEquals(answer, pv * option.getUnderlying().getUnitAmount(), TOLERANCE);
  }

  @Test
  public void testMetalFutureOption() {
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.