Package com.google.gwt.user.rebind

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


            composerFactory.addImplementedInterface(superType.getQualifiedSourceName());
        } else {
            composerFactory.setSuperclass(superType.getQualifiedSourceName());
        }

        return composerFactory.createSourceWriter(context, printWriter);
    }

    protected void write(EasyTreeLogger logger, SourceWriter writer, ComponentContainerOracle oracle, TypeOracle typeOracle, GeneratorContext context)
            throws UnableToCompleteException {
View Full Code Here


        composerFactory.addImport(ApplicationEvent.class.getName());
        composerFactory.addImport(ApplicationEventListener.class.getName());

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

        return composerFactory.createSourceWriter(context, printWriter);
    }

    protected static void write(
            EasyTreeLogger logger,
            SourceWriter writer,
View Full Code Here

   
    ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(packageName, className);
    composer.addImplementedInterface(typeName);
    PrintWriter printWriter = context.tryCreate(logger, composer.getCreatedPackage(), composer.getCreatedClassShortName());
    if(printWriter != null) {
      writer = composer.createSourceWriter(context, printWriter);
     
      for(JMethod method : classType.getMethods()) {
        generateMethod(logger, method);
        methods.add(method);
      }
View Full Code Here

            logger.log(Type.INFO, "Already genned " + classTypeName);

            return;
        }

        SourceWriter writer = mcf.createSourceWriter(context, printWriter);

        writeDeserializer(writer, type);
        writeSerializer(writer, type);

        HashSet<BeanResolver> childrenCopy = new HashSet<BeanResolver>(this.children);
View Full Code Here

                "Already genned " + typeFor.getSimpleSourceName() + "_Impl");

            return;
        }

        SourceWriter writer = mcf.createSourceWriter(context, printWriter);
        writer.println(" public String getMimeType() { return MIME_TYPE; }");
        writer.println("}");
        context.commit(logger, printWriter);
    }
}
View Full Code Here

        mcf.addImport( SerializationException.class.getCanonicalName() );
        PrintWriter pw = context.tryCreate(logger, packageName, className);
        if(pw == null){
             return packageName +"."+className;
        }
        SourceWriter sw = mcf.createSourceWriter(context, pw);

        String generatedRemoteService = type.getQualifiedSourceName() + "_impls"
                + "." +type.getSimpleSourceName() + "_RemoteService";
        sw.print( "private static final SerializationStreamFactory SERIALIZER =");
        sw.print( "(SerializationStreamFactory) GWT.create(");
View Full Code Here

        PrintWriter pw = context.tryCreate(logger, packageName, className);
        if( pw == null ){
           return;
        }
        SourceWriter sw = mcf.createSourceWriter(context, pw);

        for (JMethod method : type.getMethods()) {
            if (!(method.getReturnType() instanceof JClassType)) {
                logger.log(TreeLogger.Type.ERROR,
                    method.getReturnType().getQualifiedSourceName() +
View Full Code Here

        mcf.makeInterface();
        PrintWriter pw = context.tryCreate(logger, packageName, className);
        if(pw == null){
            return;
        }
        SourceWriter sw = mcf.createSourceWriter(context, pw);

        for (JMethod method : type.getMethods()) {
            if (!(method.getReturnType() instanceof JClassType)) {
                logger.log(TreeLogger.Type.ERROR,
                    method.getReturnType().getQualifiedSourceName() +
View Full Code Here

        mcf.addImport(com.totsp.gwittir.client.beans.Method.class.getCanonicalName());

        PrintWriter methodsPrintWriter = context.tryCreate(logger, this.packageName, this.methodsImplementationName);

        if (methodsPrintWriter != null) {
            SourceWriter methodsWriter = mcf.createSourceWriter(context, methodsPrintWriter);
            this.writeMethods(logger, methods, methodsWriter);
            methodsWriter.println("}");
            context.commit(logger, methodsPrintWriter);
        }
View Full Code Here

        if (printWriter == null) {
            //.println( "Introspector Generate skipped.");
            return packageName + "." + implementationName;
        }

        SourceWriter writer = cfcf.createSourceWriter(context, printWriter);
        this.writeIntrospectables(logger, introspectables, methods, writer);
        this.writeResolver(introspectables, writer);

        writer.println(
            "private HashMap<Class,BeanDescriptor> beanDescriptorLookup = new HashMap<Class,BeanDescriptor>();");
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.