Package org.jboss.errai.codegen.framework

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


    };
  }

  @Override
  public StatementBuilder declareVariable(String name, Class<?> type) {
    Variable v = Variable.create(name, type);
    return declareVariable(v);
  }
View Full Code Here


    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, TypeLiteral<?> type) {
    Variable v = Variable.create(name, type);
    return declareVariable(v);
  }
View Full Code Here

    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, Object initialization) {
    Variable v = Variable.create(name, initialization);
    return declareVariable(v);
  }
View Full Code Here

    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, MetaClass type, Object initialization) {
    Variable v = Variable.create(name, type, initialization);
    return declareVariable(v);
  }
View Full Code Here

    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, Class<?> type, Object initialization) {
    Variable v = Variable.create(name, type, initialization);
    return declareVariable(v);
  }
View Full Code Here

    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, TypeLiteral<?> type, Object initialization) {
    Variable v = Variable.create(name, type, initialization);
    return declareVariable(v);
  }
View Full Code Here

  public static Statement generate(Context context, Object o) {
    if (o instanceof VariableReference) {
      return context.getVariable(((VariableReference) o).getName());
    }
    else if (o instanceof Variable) {
      Variable v = (Variable) o;
      if (context.isScoped(v)) {
        return v.getReference();
      }
      else {
        throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
      return (Statement) o;
View Full Code Here

    if (o instanceof VariableReference) {
      return context.getVariable(((VariableReference) o).getName());
    }
    else if (o instanceof Variable) {
      Variable v = (Variable) o;
      if (context.isScoped(v)) {
        return v.getReference();
      }
      else {
        throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
      return (Statement) o;
View Full Code Here

    };
  }

  @Override
  public StatementBuilder declareVariable(String name, Class<?> type) {
    Variable v = Variable.create(name, type);
    return declareVariable(v);
  }
View Full Code Here

    return declareVariable(v);
  }

  @Override
  public StatementBuilder declareVariable(String name, TypeLiteral<?> type) {
    Variable v = Variable.create(name, type);
    return declareVariable(v);
  }
View Full Code Here

TOP

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

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.