Examples of Statement


Examples of com.strobel.decompiler.languages.java.ast.Statement

    @Override
    public Void visitIfElseStatement(final IfElseStatement node, final Void data) {
        super.visitIfElseStatement(node, data);

        final Statement falseStatement = node.getFalseStatement();

        if (falseStatement instanceof BlockStatement) {
            final BlockStatement falseBlock = (BlockStatement) falseStatement;
            final AstNodeCollection<Statement> falseStatements = falseBlock.getStatements();

            if (falseStatements.hasSingleElement() &&
                falseStatements.firstOrNullObject() instanceof IfElseStatement) {

                final Statement elseIf = falseStatements.firstOrNullObject();

                elseIf.remove();
                falseStatement.replaceWith(elseIf);
            }
        }

        return null;
View Full Code Here

Examples of com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.Statement

    private static void addConstraint(UpdateQueryPlan plan, LocalFieldDesc lf, Object val) {
        for (Iterator iter = lf.getColumnElements(); iter.hasNext(); ) {
            ColumnElement c = (ColumnElement) iter.next();

            for (int i = 0; i < plan.statements.size(); i++) {
                Statement s = (Statement) plan.statements.get(i);

                for (int j = 0; j < s.tableList.size(); j++) {
                    QueryTable t = (QueryTable) s.tableList.get(j);

                    if (t.getTableDesc().getTableElement() == c.getDeclaringTable()) {
                        s.addConstraint(lf, val);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of com.sun.star.rdf.Statement

    static class StmtComp implements java.util.Comparator
    {
        public int compare(Object i_Left, Object i_Right)
        {
            int eq;
            Statement left = (Statement) i_Left;
            Statement right = (Statement) i_Right;
            if ((eq = cmp(left.Graph,     right.Graph    )) != 0) return eq;
            if ((eq = cmp(left.Subject,   right.Subject  )) != 0) return eq;
            if ((eq = cmp(left.Predicate, right.Predicate)) != 0) return eq;
            if ((eq = cmp(left.Object,    right.Object   )) != 0) return eq;
            return 0;
View Full Code Here

Examples of cz.zcu.fav.liks.ml.featuresel.data.Statement

      r.setLemma(line[8]);
    return r;
  }

  private Statement parseStatement(String[] line) {
    Statement s = new Statement();
    s.setId(Integer.parseInt(line[1]));
    s.setText(line[2]);
    s.setPositive(Boolean.parseBoolean(line[3]));
    if (line.length > 4)
      s.setLemma(line[4]);
    return s;
  }
View Full Code Here

Examples of dk.brics.string.intermediate.Statement

            int counter = 0;
            for (Statement pred : r.getPreds()) {
              predsMap.put(counter, pred);
              counter++;
            }
            Statement first = copiedAssigns.getFirst();
            for (int i=0; i<predsMap.size(); i++) {
              Statement pred = predsMap.get(i);
              pred.getSuccs().remove(r);
              pred.addSucc(first);
              r.getPreds().remove(pred);
            }
            copiedAssigns.getLast().addSucc(r);
          }
        }
View Full Code Here

Examples of dk.brics.xact.analysis.flowgraph.Statement

    for (Statement s : new LinkedHashSet<Statement>(graph.getNodes()))
      s.visitBy(new StatementVisitor() {
       
        private void use(Variable v, Statement s) {
          if (v.isGlobal()) {
            Statement join = global_use.get(v);
            if (join == null) {
              // make new join node
              Debug.println(6, true, "Making join node for " + v + " (used in " + s + ")");
              join = new NopStm(s.getOrigin());
              graph.addNode(join);
View Full Code Here

Examples of eu.admire.dispel.statements.Statement

    }
    DispelFunction modelElement = (DispelFunction) view.getElement();
    LinkedList<DispelNodeDescriptor> result = new LinkedList<DispelNodeDescriptor>();
    for (Iterator<?> it = modelElement.getStatements().iterator(); it
        .hasNext();) {
      Statement childElement = (Statement) it.next();
      int visualID = DispelVisualIDRegistry.getNodeVisualID(view,
          childElement);
      if (visualID == LocalVariableStatementEditPart.VISUAL_ID) {
        result.add(new DispelNodeDescriptor(childElement, visualID));
        continue;
View Full Code Here

Examples of httl.ast.Statement

  private BlockDirective reduce(List<Statement> directives) throws ParseException {
    LinkedStack<BlockDirectiveEntry> directiveStack = new LinkedStack<BlockDirectiveEntry>();
    RootDirective rootDirective = new RootDirective();
    directiveStack.push(new BlockDirectiveEntry(rootDirective));
    for (int i = 0, n = directives.size(); i < n; i ++) {
      Statement directive = (Statement)directives.get(i);
      if (directive == null)
        continue;
      Class<?> directiveClass = directive.getClass();
      // 弹栈
      if (directiveClass == EndDirective.class
          || directiveClass == ElseDirective.class) {
        if (directiveStack.isEmpty())
          throw new ParseException("Miss #end directive.", directive.getOffset());
        BlockDirective blockDirective = ((BlockDirectiveEntry) directiveStack.pop()).popDirective();
        if (blockDirective == rootDirective)
          throw new ParseException("Miss #end directive.", directive.getOffset());
        EndDirective endDirective;
        if (directiveClass == ElseDirective.class) {
          endDirective = new EndDirective(directive.getOffset());
        } else {
          endDirective = (EndDirective) directive;
        }
        blockDirective.setEnd(endDirective);
      }
      // 设置树
      if (directiveClass != EndDirective.class) { // 排除EndDirective
        if (directiveStack.isEmpty())
          throw new ParseException("Miss #end directive.", directive.getOffset());
        ((BlockDirectiveEntry) directiveStack.peek()).appendInnerDirective(directive);
      }
      // 压栈
      if (directive instanceof BlockDirective)
        directiveStack.push(new BlockDirectiveEntry((BlockDirective) directive));
View Full Code Here

Examples of ideah.tree.stmt.Statement

    }

    private GRHS toGRHS() throws NoMatchException {
        if ("GRHS".equals(name)) {
            for (int i = 0; i < children.size() - 1; i++) {
                Statement statement = children.get(i).toStatement();
                // todo: extract guard
            }
            Expression expression = children.get(children.size() - 1).toExpression();
            // todo: statements
            return new GRHS(location, expression);
View Full Code Here

Examples of io.crate.sql.parser.StatementSplitter.Statement

    private static List<Statement> statements(String... args)
    {
        checkArgument(args.length % 2 == 0, "arguments not paired");
        ImmutableList.Builder<Statement> list = ImmutableList.builder();
        for (int i = 0; i < args.length; i += 2) {
            list.add(new Statement(args[i], args[i + 1]));
        }
        return list.build();
    }
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.