Package org.jboss.errai.ioc.rebind.ioc.codegen

Examples of org.jboss.errai.ioc.rebind.ioc.codegen.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 class BlockBuilderImpl<T> implements BlockBuilder<T> {
  protected BlockStatement blockStatement;
  protected BuildCallback<T> callback;

  public BlockBuilderImpl() {
    this.blockStatement = new BlockStatement();
  }
View Full Code Here

public class BlockBuilderImpl<T> implements BlockBuilder<T> {
  protected BlockStatement blockStatement;
  protected BuildCallback<T> callback;

  public BlockBuilderImpl() {
    this.blockStatement = new BlockStatement();
  }
View Full Code Here

  public BlockBuilder<StatementEnd> foreach(String loopVarName, Class<?> loopVarType) {
    return foreach(loopVarName, MetaClassFactory.get(loopVarType));
  }

  private BlockBuilder<StatementEnd> foreach(final String loopVarName, final MetaClass loopVarType) {
    final BlockStatement body = new BlockStatement();

    appendCallElement(new DeferredCallElement(new DeferredCallback() {
      @Override
      public void doDeferred(CallWriter writer, Context context, Statement statement) {
        GenUtil.assertIsIterable(statement);
View Full Code Here

  }

  // do while loop
  @Override
  public BlockBuilder<WhileBuilder> do_() {
    final BlockStatement body = new BlockStatement();

    return new BlockBuilderImpl<WhileBuilder>(body, new BuildCallback<WhileBuilder>() {
      @Override
      public WhileBuilder callback(Statement statement) {
        return new WhileBuilder() {
View Full Code Here

    return while_(new BooleanExpressionBuilder(rhs, op));
  }

  @Override
  public BlockBuilder<StatementEnd> while_(final BooleanExpression condition) {
    final BlockStatement body = new BlockStatement();
    appendCallElement(new ConditionalBlockCallElement(new WhileLoop(condition, body)));
    return createLoopBody(body);
  }
View Full Code Here

  @Override
  public BlockBuilder<StatementEnd> for_(final Statement initializer, final BooleanExpression condition,
      final Statement countingExpression) {
   
    final BlockStatement body = new BlockStatement();
    appendCallElement(new ConditionalBlockCallElement(new ForLoop(condition, body, initializer, countingExpression)));
    return createLoopBody(body);
  }
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

TOP

Related Classes of org.jboss.errai.ioc.rebind.ioc.codegen.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.