Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory.addImplementedInterface()


    // init composer, set class properties, create source writer
    ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(packageName,
        className);

    composer.addImplementedInterface(ExtensionsLoader.class.getName());
    composer.addImport(JSONValue.class.getName());
    composer.addImport(JSONString.class.getName());
    composer.addImport(JSONNumber.class.getName());
    composer.addImport(JSONBoolean.class.getName());
    composer.addImport(JSONObject.class.getName());
View Full Code Here


    if (pw == null) {
      return packageName + "." + simpleSourceName;
    }

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(packageName, simpleSourceName);
    factory.addImplementedInterface(typeName);
    // imports
    factory.addImport(Name.getSourceNameForClass(GWT.class));
    factory.addImport(Name.getSourceNameForClass(SafeHtml.class));
    factory.addImport(Name.getSourceNameForClass(SafeHtmlBuilder.class));
View Full Code Here

    if (pw == null) {
      return packageName + "." + simpleSourceName;
    }

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(packageName, simpleSourceName);
    factory.addImplementedInterface(typeName);
    SourceWriter sw = factory.createSourceWriter(context, pw);

    for (JMethod method : toGenerate.getMethods()) {
      if (method.getReturnType().isPrimitive() != JPrimitiveType.BOOLEAN
          && !method.getReturnType().isClass().getQualifiedSourceName().equals(
View Full Code Here

        composerFactory.addImport("org.jboss.as.console.client.ProductConfig");

        composerFactory.addImport("java.util.*");

        // Interfaces
        composerFactory.addImplementedInterface("org.jboss.as.console.client.ProductConfig");

        // SourceWriter
        SourceWriter sourceWriter = composerFactory.createSourceWriter(context, printWriter);

        // fields
View Full Code Here

    cf.addImport(ResourcePrototype.class.getCanonicalName());
    cf.addImport(ImageResource.class.getCanonicalName());
    cf.addImport(TextResource.class.getCanonicalName());
    cf.addImport(DataResource.class.getCanonicalName());
   
    cf.addImplementedInterface(userType.getQualifiedSourceName());
   
    PrintWriter pw=context.tryCreate(logger, packageName, implClassName);
    if(pw!=null){
      SourceWriter sw=cf.createSourceWriter(context, pw);
     
View Full Code Here

      // Used by the map methods
      f.addImport(ResourcePrototype.class.getName());

      // The whole point of this exercise
      f.addImplementedInterface(sourceType.getQualifiedSourceName());

      // All source gets written through this Writer
      SourceWriter sw = f.createSourceWriter(generatorContext, out);

      // Set the now-calculated simple source name
View Full Code Here

    for (String imp : imports) {
      composerFactory.addImport(imp);
    }

    composerFactory.setSuperclass(getProxySupertype().getSimpleName());
    composerFactory.addImplementedInterface(serviceAsync.getErasedType().getQualifiedSourceName());

    return composerFactory.createSourceWriter(ctx, printWriter);
  }
}
View Full Code Here

    if (pw == null) {
      return packageName + "." + simpleSourceName;
    }

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(packageName, simpleSourceName);
    factory.addImplementedInterface(typeName);
    // imports
    factory.addImport(Name.getSourceNameForClass(GWT.class));
    factory.addImport(Name.getSourceNameForClass(SafeHtml.class));
    factory.addImport(Name.getSourceNameForClass(SafeHtmlBuilder.class));
View Full Code Here

    if (pw == null) {
      return packageName + "." + simpleSourceName;
    }

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(packageName, simpleSourceName);
    factory.addImplementedInterface(typeName);
    SourceWriter sw = factory.createSourceWriter(context, pw);

    for (JMethod method : toGenerate.getMethods()) {
      if (method.getReturnType().isPrimitive() != JPrimitiveType.BOOLEAN
          && !method.getReturnType().isClass().getQualifiedSourceName().equals(
View Full Code Here

    return nextId++;
  }

  public String create () {
    ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(packageName, simpleName);
    composer.addImplementedInterface("com.artemis.gwtref.client.IReflectionCache");
    imports(composer);
    PrintWriter printWriter = context.tryCreate(logger, packageName, simpleName);
    if (printWriter == null) {
      return packageName + "." + simpleName;
    }
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.