Package com.google.gwt.user.rebind

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


        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);
    }

    private static void write(EasyTreeLogger logger, SourceWriter writer, GeneratorContext context, JClassType beanType, String className) throws UnableToCompleteException {
View Full Code Here


        composerFactory.addImport(Element.class.getName());
        composerFactory.addImport(Document.class.getName());
        composerFactory.addImport(NodeList.class.getName());

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

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

        ClassSourceFileComposerFactory composerFactory = new ClassSourceFileComposerFactory(packageName, listenerClassName);

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

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

        return composerFactory.createSourceWriter(context, printWriter);
    }

    protected static void write(
View Full Code Here

    String className = classType.getSimpleSourceName()+"_";
    if(!locale.equalsIgnoreCase("default"))
      className += locale;
   
    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()) {
View Full Code Here

        mcf.addImport(JSONNumber.class.getCanonicalName());
        mcf.addImport(JSONString.class.getCanonicalName());
        mcf.addImport(JSONNull.class.getCanonicalName());
        mcf.addImport(GWT.class.getCanonicalName());
        mcf.addImport(SerializationException.class.getCanonicalName());
        mcf.addImplementedInterface(JSONCodec.class.getCanonicalName() + "<" +
            type.getType().getQualifiedSourceName() + ">");

        PrintWriter printWriter = context.tryCreate(logger,
                type.getType().getPackage().getName(), classTypeName);
View Full Code Here

    private void writeTopSerializer(TreeLogger logger,
        GeneratorContext context, JClassType typeFor, JClassType subType) {
        ClassSourceFileComposerFactory mcf = new ClassSourceFileComposerFactory(typeFor.getPackage()
                                                                                       .getName(),
                typeFor.getSimpleSourceName() + "_Impl");
        mcf.addImplementedInterface(typeFor.getParameterizedQualifiedSourceName());
        mcf.setSuperclass(subType.getParameterizedQualifiedSourceName() +
            "_JSONCodec");

        PrintWriter printWriter = context.tryCreate(logger,
                typeFor.getPackage().getName(),
View Full Code Here

        }

        ClassSourceFileComposerFactory mcf = new ClassSourceFileComposerFactory(packageName,
                className);
        mcf.setSuperclass(StreamingServiceStub.class.getCanonicalName());
        mcf.addImplementedInterface(type.getQualifiedSourceName() + "Async");
        mcf.addImport( SerializationStreamFactory.class.getCanonicalName() );
        mcf.addImport( GWT.class.getCanonicalName() );
        mcf.addImport( StreamServiceCallback.class.getCanonicalName() );
        mcf.addImport( ClientSerializationStreamWriter.class.getCanonicalName() );
        mcf.addImport( SerializationException.class.getCanonicalName() );
View Full Code Here

        String packageName = type.getQualifiedSourceName() + "_impls";
        String className = type.getSimpleSourceName() + "_RemoteService";
        ClassSourceFileComposerFactory mcf = new ClassSourceFileComposerFactory(packageName,
                className);
        mcf.makeInterface();
        mcf.addImplementedInterface(
            "com.google.gwt.user.client.rpc.RemoteService");

        PrintWriter pw = context.tryCreate(logger, packageName, className);
        if( pw == null ){
           return;
View Full Code Here

            context.commit(logger, methodsPrintWriter);
        }

        ClassSourceFileComposerFactory cfcf = new ClassSourceFileComposerFactory(this.packageName,
                this.implementationName);
        cfcf.addImplementedInterface(typeName);
        cfcf.addImport("java.util.HashMap");
        cfcf.addImport(com.totsp.gwittir.client.beans.Method.class.getCanonicalName());
        cfcf.addImport(com.totsp.gwittir.client.beans.Property.class.getCanonicalName());
        cfcf.addImport(com.totsp.gwittir.client.beans.BeanDescriptor.class.getCanonicalName());
View Full Code Here

            generateSerializers();

            ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(
                    getPackageName(), getClassName());
            composer.setSuperclass(GwtClientProxy.class.getCanonicalName());
            composer.addImplementedInterface(getTypeQName());
            composer.addImport(GWT.class.getCanonicalName());
            composer.addImport(IOException.class.getCanonicalName());
            composer.addImport(Client.class.getCanonicalName());
            composer.addImport(Protocol.class.getCanonicalName());
            composer.addImport(Preference.class.getCanonicalName());
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.