Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.SourceWriter.commit()


      writer.println();
      writer.println("@Override");
      writer.println("public native CurrencyData getDefault() /*-{");
      writer.println("  return " + defCurrencyObject + ";");
      writer.println("}-*/;");
      writer.commit(logger);
    }
    return packageName + "." + className;
  }
     
  /**
 
View Full Code Here


      writeAutoBean(type);
    }
    writeDynamicMethods(sw);
    writeEnumSetup(sw);
    writeMethods(sw);
    sw.commit(logger);

    return factory.getCreatedClassName();
  }

  /**
 
View Full Code Here

    if (type.isSimpleBean()) {
      writeCreateSimpleBean(sw, type);
    }
    writeTraversal(sw, type);
    sw.commit(logger);
  }

  /**
   * For interfaces that consist of nothing more than getters and setters,
   * create a map-based implementation that will allow the AutoBean's internal
View Full Code Here

        sw.println("return m.get(n);");
        sw.outdent();
        sw.println("}");

        sw.println(sb.toString());
        sw.commit(logger);
      }

      return composer.getCreatedClassName();

    } catch (Exception e) {
View Full Code Here

    if (pw != null) {
      SourceWriter sw = composer.createSourceWriter(context, pw);
      sw.println("public BeanModel newInstance() {");
      sw.println("return new " + beanModelName + "();");
      sw.println("}");
      sw.commit(logger);
    }
    return composer.getCreatedClassName();
  }

  protected String createBean(JClassType bean, TreeLogger logger, GeneratorContext context) throws Exception {
View Full Code Here

      // delegate hashCode to bean
      sw.println("public int hashCode(){");
      sw.println("  return bean.hashCode();");
      sw.println("}");

      sw.commit(logger);
    }
    return composer.getCreatedClassName();
  }

  protected JClassType getMarkerBean(JClassType type) throws NotFoundException {
View Full Code Here

      sw.println("}");
      sw.println(logPatternToCode(logPattern));
      sw.outdent();
      sw.println("}\n");

      sw.commit(logger);
    }
    return composerFactory.getCreatedClassName();
  }
}
View Full Code Here

        }
        src.println("return addonList;");
        src.outdent();
        src.println("}");

        src.commit(logger);
        System.out.println("Generating for: " + typeName);
        return typeName + "Generated";
    }

    public SourceWriter getSourceWriter(final JClassType classType, final GeneratorContext context, final TreeLogger logger) {
View Full Code Here

    generateProxyContructor(javadocAnnotationDeprecationBranch, srcWriter);

    generateProxyMethods(srcWriter, sto, syncMethToAsyncMethMap);

    srcWriter.commit(logger);

    return getProxyQualifiedName();
  }

  /**
 
View Full Code Here

    if (sourceWriter != null) {
      JClassType[] allTestTypes = getAllTestTypes(context.getTypeOracle());
      Set<String> testClasses = getTestTypesForModule(logger, moduleName,
          allTestTypes);
      writeCreateNewTestCaseMethod(testClasses, sourceWriter);
      sourceWriter.commit(logger);
    }

    return qualifiedStubClassName;
  }
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.