Package org.jboss.errai.codegen.framework

Examples of org.jboss.errai.codegen.framework.BlockStatement


  @Override
  public MetaConstructor[] getConstructors() {
    if (constructors.isEmpty()) {
      // add an empty no-arg constructor
      BuildMetaConstructor buildMetaConstructor =
              new BuildMetaConstructor(this, new BlockStatement(), DefParameters.none());

      buildMetaConstructor.setScope(Scope.Public);
      return new MetaConstructor[]{buildMetaConstructor};
    }
    else {
View Full Code Here


  public SwitchBlock(Statement switchExprStmt) {
    this.switchExprStmt = switchExprStmt;
  }

  public void addCase(LiteralValue<?> value) {
    caseBlocks.put(value, new BlockStatement());
  }
View Full Code Here

    return caseBlocks.get(value);
  }

  public BlockStatement getDefaultBlock() {
    if (defaultBlock == null)
      defaultBlock = new BlockStatement();

    return defaultBlock;
  }
View Full Code Here

  public BlockStatement getBlock() {
    return block;
  }

  public void addCatchBlock(Variable exception) {
    catchBlocks.put(exception, new BlockStatement());
  }
View Full Code Here

    return catchBlocks.get(exceptionVar);
  }

  public BlockStatement getFinallyBlock() {
    if (finallyBlock == null)
      finallyBlock = new BlockStatement();
   
    return finallyBlock;
  }
View Full Code Here

            .append(catchBlocks.get(exception).generate(ctx))
            .append("\n} ");
      }
    }
    else if (finallyBlock == null) {
      finallyBlock = new BlockStatement();
    }

    if (finallyBlock != null) {
      Context ctx = Context.create(context);
      buf.append(" finally {\n").append(finallyBlock.generate(ctx)).append("\n}\n");
View Full Code Here

  private BooleanExpression condition;
  private BlockStatement block;

  protected AbstractConditionalBlock(BooleanExpression condition) {
    this.condition = condition;
    this.block = new BlockStatement();
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.codegen.framework.BlockStatement

Copyright © 2018 www.massapicom. 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.