Examples of SwitchBlock


Examples of com.bacoder.parser.java.api.SwitchBlock

    List<SwitchBlock> switchBlocks = transform(context, SwitchBlockStatementGroupContext.class,
        new Function<SwitchBlockStatementGroupContext, SwitchBlock>() {
          @Override
          public SwitchBlock apply(SwitchBlockStatementGroupContext context) {
            SwitchBlock switchBlock = createNode(context, SwitchBlock.class);
            switchBlock.setLabels(getSwitchLabels(context));
            switchBlock.setStatements(transform(context, BlockStatementContext.class,
                new Function<BlockStatementContext, BlockStatement>() {
                  @Override
                  public BlockStatement apply(BlockStatementContext context) {
                    return getAdapter(BlockStatementAdapter.class).adapt(context);
                  }
                }));
            return switchBlock;
          }
        });

    List<SwitchLabel> extraSwitchLabels = getSwitchLabels(context);
    if (!extraSwitchLabels.isEmpty()) {
      List<SwitchLabelContext> switchLabelContexts = getChildren(context, SwitchLabelContext.class);
      SwitchBlock extraSwitchBlock =
          createNode(switchLabelContexts.get(0),
              switchLabelContexts.get(switchLabelContexts.size() - 1), SwitchBlock.class);
      extraSwitchBlock.setLabels(extraSwitchLabels);
      switchBlocks.add(extraSwitchBlock);
    }

    switchStatement.setSwitchBlocks(switchBlocks);
View Full Code Here

Examples of com.cloudbees.groovy.cps.impl.SwitchBlock

    /**
     * @see #case_(int, Block, Block)
     */
    public Block switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps) {
        return new SwitchBlock(label, switchExp, defaultStmt, Arrays.asList(caseExps));
    }
View Full Code Here

Examples of com.cloudbees.groovy.cps.impl.SwitchBlock

    /**
     * @see #case_(int, Block, Block)
     */
    public Block switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps) {
        return new SwitchBlock(label, switchExp, defaultStmt, Arrays.asList(caseExps));
    }
View Full Code Here

Examples of com.cloudbees.groovy.cps.impl.SwitchBlock

    /**
     * @see #case_(int, Block, Block)
     */
    public Block switch_(String label, Block switchExp, Block defaultStmt, CaseExpression... caseExps) {
        return new SwitchBlock(label, switchExp, defaultStmt, Arrays.asList(caseExps));
    }
View Full Code Here

Examples of org.candle.decompiler.ast.swtch.SwitchBlock

    }
    else {
      seen.add(line);
    }

    SwitchBlock switchBlock = new SwitchBlock(line);
    current.addChild(switchBlock);
    current = switchBlock;
   
    List<CaseIntermediate> cases = igc.getCases(line);
   
View Full Code Here

Examples of org.jboss.errai.codegen.control.SwitchBlock

    super(context, callElementBuilder);
  }

  @Override
  public CaseBlockBuilder switch_() {
    return switch_(new SwitchBlock());
  }
View Full Code Here

Examples of org.jboss.errai.codegen.control.SwitchBlock

    return switch_(new SwitchBlock());
  }
 
  @Override
  public CaseBlockBuilder switch_(Statement statement) {
    return switch_(new SwitchBlock(statement));
  }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.control.SwitchBlock

    super(context, callElementBuilder);
  }

  @Override
  public CaseBlockBuilder switch_() {
    return switch_(new SwitchBlock());
  }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.control.SwitchBlock

    return switch_(new SwitchBlock());
  }
 
  @Override
  public CaseBlockBuilder switch_(Statement statement) {
    return switch_(new SwitchBlock(statement));
  }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.control.SwitchBlock

    super(context, callElementBuilder);
  }

  @Override
  public CaseBlockBuilder switch_() {
    return switch_(new SwitchBlock());
  }
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.