Package com.google.gwt.codegen.server

Examples of com.google.gwt.codegen.server.JavaSourceWriterBuilder


  String generateRuntimeSelection(CodeGenContext ctx, JClassType targetClass, String defaultClass,
      GwtLocale locale, Map<String, Set<GwtLocale>> localeMap) {
    String className = targetClass.getName().replace('.', '_') + '_' + locale.getAsString()
        + "_runtimeSelection";
    String pkgName = targetClass.getPackage().getName();
    JavaSourceWriterBuilder builder = ctx.addClass(pkgName, className);
    if (builder != null) {
      writeRuntimeSelection(builder, targetClass, defaultClass, locale, localeMap);
    }
    return pkgName + '.' + className;
  }
View Full Code Here


      @Override
      public JavaSourceWriterBuilder addClass(String superPath, String pkgName, String className) {
        StringWriter buf = new StringWriter();
        bufs.put(className, buf);
        AbortablePrintWriter apw = new AbortablePrintWriter(new PrintWriter(buf));
        return new JavaSourceWriterBuilder(apw, pkgName, className);
      }
     
      @Override
      public void error(String msg) {
        fail(msg);
View Full Code Here

      String fileName = pkgPath + classPath + ".java";
      try {
        PrintWriter pw = createOutputFile("", fileName);
        AbortablePrintWriter apw = new AbortablePrintWriter(pw);
        printHeader(apw);
        return new JavaSourceWriterBuilder(apw, pkgName, className);
      } catch (FileNotFoundException e) {
        error("Unable to create " + fileName, e);
        return null;
      } catch (IOException e) {
        error("Unable to create " + fileName, e);
View Full Code Here

TOP

Related Classes of com.google.gwt.codegen.server.JavaSourceWriterBuilder

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.