Examples of generate()


Examples of org.jboss.errai.codegen.framework.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));
        }
        return buf.toString();
      }
    };
    writer.reset();
View Full Code Here

Examples of org.jboss.errai.codegen.framework.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.framework.builder.impl.AssignmentBuilder.generate()

   
    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.framework.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));
  }
}
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCBootstrapGenerator.generate()

                    }
                  }
                }, packages, true);


    final String classStr = bootstrapGenerator.generate(packageName, className);

    final File fileCacheDir = RebindUtils.getErraiCacheDir();
    final File cacheFile = new File(fileCacheDir.getAbsolutePath() + "/" + className + ".java");

    RebindUtils.writeStringToFile(cacheFile, classStr);
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.codegen.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.createClassMember(field.getName(), field.getType()));
           }
View Full Code Here

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

      if (element.getClass().isArray()) {
        generateInitialization(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

Examples of org.jboss.errai.ioc.rebind.ioc.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));
        }
        return buf.toString();
      }
    };
    writer.reset();
View Full Code Here

Examples of org.jboss.errai.ioc.rebind.ioc.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));
  }
}
View Full Code Here

Examples of org.jboss.internal.soa.esb.webservice.JAXWSProviderClassGenerator.generate()

                        {
                            final String wsHandlerName = "WEB-INF/classes/" + serviceInfo.getPackageName().replace('.', '/') + "/esb-jaxws-handlers.xml";
                            webDeployment.addEntry(wsHandlerName, handlers.getBytes("UTF-8"));
                        }
                       
                        final byte[] wsClass = generator.generate(deploymentName, service.getCategory(),
                            service.getName(), serviceInfo, includeHandlers);
                        final String wsClassName = serviceInfo.getClassName().replace('.', '/') + ".class";
                        webDeployment.addEntry("WEB-INF/classes/" + wsClassName, wsClass);
                        // Servlet....
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.