Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.ClassSourceFileComposerFactory


        BinaryName.getShortClassName(Name.getBinaryNameForClass(getEditorDelegateType())));

    String packageName = editor.getPackage().getName();
    PrintWriter pw = context.tryCreate(logger, packageName, delegateSimpleName);
    if (pw != null) {
      ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
          packageName, delegateSimpleName);
      factory.setSuperclass(String.format("%s",
          Name.getSourceNameForClass(getEditorDelegateType())));
      SourceWriter sw = factory.createSourceWriter(context, pw);

      EditorData[] data = model.getEditorData(editor);

      /*
       * Declare fields in the generated subclass for the editor and the object
View Full Code Here


      String superClass, String... interfaceNames) {
    PrintWriter printWriter = context.tryCreate(logger, packageName, className);
    if (printWriter == null) {
      return null;
    }
    ClassSourceFileComposerFactory composerFactory
        = new ClassSourceFileComposerFactory(packageName, className);
    composerFactory.addImport("com.google.gwt.core.client.GWT");
    composerFactory.addImport("com.google.gwt.core.client.JavaScriptObject");
   
    if (superClass != null) {
      composerFactory.setSuperclass(superClass);
    }
    for (String interfaceName : interfaceNames) {
      composerFactory.addImplementedInterface(interfaceName);
    }

    composerFactory.addImport("org.timepedia.exporter.client.Exporter");
    return composerFactory.createSourceWriter(context, printWriter);
  }
View Full Code Here

      return packageName + "." + simpleSourceName;
    }

    model = new AutoBeanFactoryModel(logger, toGenerate);

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
        packageName, simpleSourceName);
    factory.setSuperclass(AbstractAutoBeanFactory.class.getCanonicalName());
    factory.addImplementedInterface(typeName);
    SourceWriter sw = factory.createSourceWriter(context, pw);
    for (AutoBeanType type : model.getAllTypes()) {
      writeAutoBean(type);
    }
    writeDynamicMethods(sw);
    writeEnumSetup(sw);
    writeMethods(sw);
    sw.commit(logger);

    return factory.getCreatedClassName();
  }
View Full Code Here

    if (pw == null) {
      // Previously-created
      return;
    }

    ClassSourceFileComposerFactory factory = new ClassSourceFileComposerFactory(
        type.getPackageNome(), type.getSimpleSourceName());
    factory.setSuperclass(AbstractAutoBean.class.getCanonicalName() + "<"
        + type.getPeerType().getQualifiedSourceName() + ">");
    SourceWriter sw = factory.createSourceWriter(context, pw);

    writeShim(sw, type);

    // Instance initializer code to set the shim's association
    sw.println("{ %s.set(shim, %s.class.getName(), this); }",
View Full Code Here

        getProxySimpleName());
    if (printWriter == null) {
      return null;
    }

    ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(
        getPackageName(), getProxySimpleName());

    composerFactory.addImport(GWT.class.getName());
    String className = UncaughtExceptionHandler.class.getName();
    className = className.replace('$', '.');
    composerFactory.addImport(className);

    composerFactory.addImplementedInterface(ServiceDefTarget.class.getName());
    composerFactory.addImplementedInterface(getAsyncIntfQualifiedName());

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

        if (printWriter == null) {
            return null;
        }

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, simpleClassName);

        composerFactory.setSuperclass(superClass.getQualifiedSourceName());

        //TODO add imports here
        composerFactory.addImport(BeanInfoRegistry.class.getName());
        composerFactory.addImport(BeanInfo.class.getName());
        composerFactory.addImport(Map.class.getName());
        composerFactory.addImport(HashMap.class.getName());

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

        if (printWriter == null) {
            return null;
        }

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, beanClassName);

        addImports(composerFactory);

        if (superType.isInterface() != null) {
            composerFactory.addImplementedInterface(superType.getQualifiedSourceName());
        } else {
            composerFactory.setSuperclass(superType.getQualifiedSourceName());
        }

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

        if (printWriter == null) {
            return null;
        }

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, beanClassName);

        //TODO add imports here
        composerFactory.addImport(BeanInfo.class.getName());
        composerFactory.addImport(BeanInfoRegistry.class.getName());
        composerFactory.addImport(PropertyDescriptor.class.getName());
        composerFactory.addImport(AbstractPropertyDescriptor.class.getName());
        composerFactory.addImport(Map.class.getName());
        composerFactory.addImport(HashMap.class.getName());
        composerFactory.addImport(Type.class.getName());
        composerFactory.addImport(TypeImpl.class.getName());
        composerFactory.addImport(TypeRegistry.class.getName());
        composerFactory.addImport(PathValueProxy.class.getName());
        composerFactory.addImport(DefaultPathValueProxy.class.getName());
        composerFactory.addImport(PathDescriptorProxy.class.getName());
        composerFactory.addImport(DefaultPathDescriptorProxy.class.getName());
        composerFactory.addImport(UnsupportedOperationException.class.getName());
        composerFactory.addImport(TypeMismatchException.class.getName());
        composerFactory.addImport(BeanValidator.class.getName());

        composerFactory.addImplementedInterface(BeanInfo.class.getName());

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

        if (printWriter == null) {
            return null;
        }

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, className);

        //TODO add imports here
        composerFactory.addImport(GWT.class.getName());

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

        if (printWriter == null) {
            return null;
        }

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, validatorClassName);

        //TODO add imports here
        composerFactory.addImport(BeanValidator.class.getName());
        composerFactory.addImport(AbstractBeanValidator.class.getName());
        composerFactory.addImport(ViolationRegistry.class.getName());
        composerFactory.addImport(ConstraintValidator.class.getName());
        composerFactory.addImport(PropertyDescriptor.class.getName());
        composerFactory.addImport(BeanInfo.class.getName());
        composerFactory.addImport(BeanInfoRegistry.class.getName());
        composerFactory.addImport(ViolationRegistry.class.getName());
        composerFactory.addImport(Set.class.getName());
        composerFactory.addImport(HashSet.class.getName());
        composerFactory.addImport(Map.class.getName());
        composerFactory.addImport(Map.class.getName() + ".Entry");
        composerFactory.addImport(List.class.getName());
        composerFactory.addImport(ArrayList.class.getName());
        composerFactory.addImport(HashMap.class.getName());
        composerFactory.addImport(Default.class.getName());
        composerFactory.addImport(PathImpl.class.getName());
        composerFactory.addImport(PathImpl.class.getName() + ".NodeImpl");
        composerFactory.addImport(Collection.class.getName());

        composerFactory.setSuperclass(AbstractBeanValidator.class.getName() + "<" + beanClassName + ">");


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

TOP

Related Classes of com.google.gwt.user.rebind.ClassSourceFileComposerFactory

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.