Examples of generate()


Examples of org.jboss.arquillian.impl.DeploymentGenerator.generate()

   public void callback(Context context, ClassEvent event) throws Exception
   {
      DeploymentGenerator generator = context.get(DeploymentGenerator.class);
      Validate.stateNotNull(generator, "No " + DeploymentGenerator.class.getName() + " found in context");
     
      Archive<?> deployment = generator.generate(event.getTestClass());
     
      context.add(Archive.class, deployment);
   }
}
View Full Code Here

Examples of org.jboss.arquillian.spi.client.deployment.DeploymentScenarioGenerator.generate()

   public void generateDeployment(@Observes GenerateDeployment event)
   {
      DeploymentScenarioGenerator generator = serviceLoader.get().onlyOne(
            DeploymentScenarioGenerator.class, AnnotationDeploymentScenarioGenerator.class);
     
      DeploymentScenario scenario = generator.generate(event.getTestClass());
      validate(scenario);
      createTestableDeployments(scenario, event.getTestClass());
     
      deployment.set(scenario);
   }
View Full Code Here

Examples of org.jboss.errai.codegen.CallParameters.generate()

          }

          final StringBuilder buf = new StringBuilder();
          buf.append("new ").append(LoadClassReference.getClassReference(type, context, true));
          if (callParameters != null) {
            buf.append(callParameters.generate(Context.create(context)));
          }
          if (extendsBlock != null) {
            for (final MetaField field : type.getDeclaredFields()) {
              context.addVariable(Variable.create(field.getName(), field.getType()));
            }
View Full Code Here

Examples of org.jboss.errai.codegen.Statement.generate()

    final Statement internedStatement = context.intern(this);

    if (internedStatement != null) {
      boolean permissiveMode = GenUtil.isPermissiveMode();
      GenUtil.setPermissiveMode(true);
      String s = internedStatement.generate(context);
      GenUtil.setPermissiveMode(permissiveMode);
      return s;
    }
    else {
      return getCanonicalString(context);
View Full Code Here

Examples of org.jboss.errai.codegen.VariableReference.generate()

          else {
            VariableReference exceptionVar = context.getVariable(exceptionVariableName);
            if (!exceptionVar.getType().isAssignableTo(Throwable.class)) {
              throw new InvalidTypeException("Variable " + exceptionVariableName + " is not a Throwable");
            }
            buf.append(exceptionVar.generate(context));
          }
        }
        catch (GenerationException e) {
          blameAndRethrow(e);
        }
View Full Code Here

Examples of org.jboss.errai.codegen.builder.ContextualStatementBuilder.generate()

      String generatedCache;

      @Override
      public String generate(Context context) {
        if (generatedCache != null) return generatedCache;
        return generatedCache = statementBuilder.generate(context);
      }

      @Override
      public MetaClass getType() {
        return statementBuilder.getType();
View Full Code Here

Examples of org.jboss.errai.codegen.builder.impl.AssignmentBuilder.generate()

    try {
      if (next == null) {
        wrapperStmt = new Statement() {
          @Override
          public String generate(Context context) {
            return stmt.generate(context) + ";";
          }
 
          @Override
          public MetaClass getType() {
            return stmt.getType();
View Full Code Here

Examples of org.jboss.errai.codegen.control.branch.Label.generate()

  public void handleCall(CallWriter writer, Context context, Statement statement) {
    Label label = Label.create(name);
    context.addLabel(label);
   
    writer.reset();
    writer.append(label.generate(context));
  }

  @Override
  public String toString() {
    return "[[Label<" + name + ">]" + next + "]";
View Full Code Here

Examples of org.jboss.errai.codegen.framework.CallParameters.generate()

            throw new UndefinedConstructorException(type, callParameters.getParameterTypes());

          StringBuilder buf = new StringBuilder();
          buf.append("new ").append(LoadClassReference.getClassReference(type, context, true));
          if (callParameters != null) {
            buf.append(callParameters.generate(Context.create(context)));
          }
          if (extendsBlock != null) {
            for (MetaField field : type.getDeclaredFields()) {
              context.addVariable(Variable.create(field.getName(), field.getType()));
            }
View Full Code Here

Examples of org.jboss.errai.codegen.framework.Statement.generate()

      if (element.getClass().isArray()) {
        generateInitialization(context, buf, element);
      }
      else {
        Statement statement = GenUtil.generate(context, element);
        String statementExpr = statement.generate(context);
        GenUtil.assertAssignableTypes(statement.getType(), componentType);
        buf.append(statementExpr);
      }
      if (i + 1 < length) {
        buf.append(", ");
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.