Package com.google.gwt.user.rebind.rpc

Examples of com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder$TypeInfoComputed$SerializationIssue


        if (annotation == null) {
          logger.log(TreeLogger.ERROR, "No SerialTypes annotation on CometSerializer type: " + typeName);
          throw new UnableToCompleteException();
        }
       
        SerializableTypeOracleBuilder typesSentToBrowserBuilder = new SerializableTypeOracleBuilder(
                        logger, context.getPropertyOracle(), context);
        SerializableTypeOracleBuilder typesSentFromBrowserBuilder = new SerializableTypeOracleBuilder(
                        logger, context.getPropertyOracle(), context);
       
        for (Class<? extends Serializable> serializable : annotation.value()) {
          int rank = 0;
          if (serializable.isArray()) {
            while(serializable.isArray()) {
              serializable = (Class<? extends Serializable>) serializable.getComponentType();
              rank++;
            }
          }
           
          JType resolvedType = typeOracle.getType(serializable.getCanonicalName());
          while (rank > 0) {
            resolvedType = typeOracle.getArrayType(resolvedType);
            rank--;
          }
         
          typesSentToBrowserBuilder.addRootType(logger, resolvedType);
                    typesSentFromBrowserBuilder.addRootType(logger, resolvedType);
        }
       
        // Create a resource file to receive all of the serialization information
        // computed by STOB and mark it as private so it does not end up in the
        // output.
        OutputStream pathInfo = context.tryCreateResource(logger, typeName + ".rpc.log");
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(pathInfo));
        writer.write("====================================\n");
        writer.write("Types potentially sent from server:\n");
        writer.write("====================================\n\n");
        writer.flush();
       
        typesSentToBrowserBuilder.setLogOutputWriter(writer);
        SerializableTypeOracle typesSentToBrowser = typesSentToBrowserBuilder.build(logger);

        writer.write("===================================\n");
        writer.write("Types potentially sent from browser:\n");
        writer.write("===================================\n\n");
        writer.flush();
        typesSentFromBrowserBuilder.setLogOutputWriter(writer);
          SerializableTypeOracle typesSentFromBrowser = typesSentFromBrowserBuilder.build(logger);
       
        writer.close();
       
        if (pathInfo != null) {
          context.commitResource(logger, pathInfo).setPrivate(true);
View Full Code Here


                if (annotation == null) {
                    logger.log(TreeLogger.ERROR, "No SerialTypes annotation on CometSerializer type: " + typeName);
                    throw new UnableToCompleteException();
                }

                SerializableTypeOracleBuilder typesSentToBrowserBuilder = new SerializableTypeOracleBuilder(logger, context);
                SerializableTypeOracleBuilder typesSentFromBrowserBuilder = new SerializableTypeOracleBuilder(logger, context);

                List<Class<?>> serializableTypes = new ArrayList();
                Collections.addAll(serializableTypes, annotation.value());
                for (Class<?> serializable : serializableTypes) {
                    int rank = 0;
                    if (serializable.isArray()) {
                        while (serializable.isArray()) {
                            serializable = (Class<?>) serializable.getComponentType();
                            rank++;
                        }
                    }

                    JType resolvedType = typeOracle.getType(serializable.getCanonicalName());
                    while (rank > 0) {
                        resolvedType = typeOracle.getArrayType(resolvedType);
                        rank--;
                    }

                    typesSentToBrowserBuilder.addRootType(logger, resolvedType);
                    typesSentFromBrowserBuilder.addRootType(logger, resolvedType);
                }

                // Create a resource file to receive all of the serialization information
                // computed by STOB and mark it as private so it does not end up in the
                // output.
                OutputStream pathInfo = context.tryCreateResource(logger, typeName + ".rpc.log");
                PrintWriter writer = new PrintWriter(new OutputStreamWriter(pathInfo));
                writer.write("====================================\n");
                writer.write("Types potentially sent from server:\n");
                writer.write("====================================\n\n");
                writer.flush();

                typesSentToBrowserBuilder.setLogOutputWriter(writer);
                SerializableTypeOracle typesSentToBrowser = typesSentToBrowserBuilder.build(logger);

                writer.write("===================================\n");
                writer.write("Types potentially sent from browser:\n");
                writer.write("===================================\n\n");
                writer.flush();
                typesSentFromBrowserBuilder.setLogOutputWriter(writer);
                SerializableTypeOracle typesSentFromBrowser = typesSentFromBrowserBuilder.build(logger);

                writer.close();

                if (pathInfo != null) {
                    context.commitResource(logger, pathInfo).setPrivate(true);
View Full Code Here

        if (annotation == null) {
          logger.log(TreeLogger.ERROR, "No SerialTypes annotation on CometSerializer type: " + typeName);
          throw new UnableToCompleteException();
        }
       
        SerializableTypeOracleBuilder typesSentToBrowserBuilder = new SerializableTypeOracleBuilder(logger, context.getPropertyOracle(), context);
        SerializableTypeOracleBuilder typesSentFromBrowserBuilder = new SerializableTypeOracleBuilder(logger, context.getPropertyOracle(), context);
       
        for (Class<? extends Serializable> serializable : annotation.value()) {
          int rank = 0;
          if (serializable.isArray()) {
            while (serializable.isArray()) {
              serializable = (Class<? extends Serializable>) serializable.getComponentType();
              rank++;
            }
          }
         
          JType resolvedType = typeOracle.getType(serializable.getCanonicalName());
          while (rank > 0) {
            resolvedType = typeOracle.getArrayType(resolvedType);
            rank--;
          }
         
          typesSentToBrowserBuilder.addRootType(logger, resolvedType);
        }
       
        OutputStream pathInfo = context.tryCreateResource(logger, typeName + ".rpc.log");
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(pathInfo));
        writer.write("====================================\n");
        writer.write("Types potentially sent from browser:\n");
        writer.write("====================================\n\n");
        writer.flush();
       
        typesSentToBrowserBuilder.setLogOutputWriter(writer);
          SerializableTypeOracle typesSentFromBrowser = typesSentFromBrowserBuilder.build(logger);

        writer.write("===================================\n");
        writer.write("Types potentially sent from server:\n");
        writer.write("===================================\n\n");
        writer.flush();
        typesSentFromBrowserBuilder.setLogOutputWriter(writer);
        SerializableTypeOracle typesSentToBrowser = typesSentToBrowserBuilder.build(logger);
       
        writer.close();
       
        if (pathInfo != null) {
View Full Code Here

     * @return An instance of a {@link SerializableTypeOracleBuilder}.
     * @throws Exception
     */
    private SerializableTypeOracleBuilder getSerializableTypeOracleBuilder2_2()
            throws Exception {
        SerializableTypeOracleBuilder result = null;

        Constructor<SerializableTypeOracleBuilder> c = null;
        c = SerializableTypeOracleBuilder.class.getDeclaredConstructor(
                TreeLogger.class, PropertyOracle.class, TypeOracle.class);
        result = c.newInstance(getLogger(), getContext().getPropertyOracle(),
View Full Code Here

     * @return An instance of a {@link SerializableTypeOracleBuilder}.
     * @throws Exception
     */
    private SerializableTypeOracleBuilder getSerializableTypeOracleBuilder2_3()
            throws Exception {
        SerializableTypeOracleBuilder result = null;

        // At the date of 04 may 2011, the GWT GeneratorContextExt class
        // is considered as experimental and surely to be removed from gwt
        // package.
        Class<?> genClass = Class
View Full Code Here

     * @return An instance of a {@link SerializableTypeOracleBuilder}.
     * @throws Exception
     */
    private SerializableTypeOracleBuilder getSerializableTypeOracleBuilder2_5()
            throws Exception {
        SerializableTypeOracleBuilder result = null;

        Constructor<SerializableTypeOracleBuilder> c = null;
        c = SerializableTypeOracleBuilder.class.getDeclaredConstructor(
                TreeLogger.class, PropertyOracle.class, GeneratorContext.class);
        result = c.newInstance(getLogger(), getContext().getPropertyOracle(),
View Full Code Here

               
        }
       
        if(!serializedTypes.isEmpty()) {
            final TreeLogger tempLogger = createFilteredLogger(logger.branch(TreeLogger.DEBUG, "Generating serialization code"), TreeLogger.ERROR);
                SerializableTypeOracleBuilder serializerBuilder = new SerializableTypeOracleBuilder(tempLogger, context.getPropertyOracle(), (GeneratorContextExt) context);
            for(JType cls : serializedTypes) {
                    serializerBuilder.addRootType(tempLogger, cls);
            }
            SerializableTypeOracle serializableTypeOracle = serializerBuilder.build(tempLogger);
                String serializerClassName = baseType.getQualifiedSourceName()+"_TypeSerializer";
                String serializerSimpleName = baseType.getSimpleSourceName()+"_TypeSerializer";
            TypeSerializerCreator typeSerializerCreator = new TypeSerializerCreator(tempLogger, serializableTypeOracle, serializableTypeOracle, (GeneratorContextExt) context, serializerClassName, serializerSimpleName);
                typeSerializerCreator.realize(tempLogger);
                sw.println("com.google.gwt.user.client.rpc.impl.Serializer serializer = new " + serializerClassName + "();");
View Full Code Here

     * @return An instance of a {@link SerializableTypeOracleBuilder}.
     * @throws Exception
     */
    private SerializableTypeOracleBuilder getSerializableTypeOracleBuilder2_2()
            throws Exception {
        SerializableTypeOracleBuilder result = null;

        Constructor<SerializableTypeOracleBuilder> c = null;
        c = SerializableTypeOracleBuilder.class.getDeclaredConstructor(
                TreeLogger.class, PropertyOracle.class, TypeOracle.class);
        result = c.newInstance(getLogger(), getContext().getPropertyOracle(),
View Full Code Here

     * @return An instance of a {@link SerializableTypeOracleBuilder}.
     * @throws Exception
     */
    private SerializableTypeOracleBuilder getSerializableTypeOracleBuilder2_3()
            throws Exception {
        SerializableTypeOracleBuilder result = null;

        // At the date of 04 may 2011, the GWT GeneratorContextExt class
        // is considered as experimental and surely to be removed from gwt
        // package.
        Class<?> genClass = Class
View Full Code Here

        if (annotation == null) {
          logger.log(TreeLogger.ERROR, "No SerialTypes annotation on CometSerializer type: " + typeName);
          throw new UnableToCompleteException();
        }
       
        SerializableTypeOracleBuilder typesSentToBrowserBuilder = new SerializableTypeOracleBuilder(logger, context.getPropertyOracle(), typeOracle);
        SerializableTypeOracleBuilder typesSentFromBrowserBuilder = new SerializableTypeOracleBuilder(logger, context.getPropertyOracle(), typeOracle);
       
        for (Class<? extends Serializable> serializable : annotation.value()) {
          int rank = 0;
          if (serializable.isArray()) {
            while(serializable.isArray()) {
              serializable = (Class<? extends Serializable>) serializable.getComponentType();
              rank++;
            }
          }
           
          JType resolvedType = typeOracle.getType(serializable.getCanonicalName());
          while (rank > 0) {
            resolvedType = typeOracle.getArrayType(resolvedType);
            rank--;
          }
         
          typesSentToBrowserBuilder.addRootType(logger, resolvedType);
        }
       
        // Create a resource file to receive all of the serialization information
        // computed by STOB and mark it as private so it does not end up in the
        // output.
        OutputStream pathInfo = context.tryCreateResource(logger, typeName + ".rpc.log");
        typesSentToBrowserBuilder.setLogOutputStream(pathInfo);
        typesSentFromBrowserBuilder.setLogOutputStream(pathInfo);
       
        SerializableTypeOracle typesSentToBrowser = typesSentToBrowserBuilder.build(logger);
        SerializableTypeOracle typesSentFromBrowser = typesSentFromBrowserBuilder.build(logger);
       
        if (pathInfo != null) {
          context.commitResource(logger, pathInfo).setPrivate(true);
        }
       
View Full Code Here

TOP

Related Classes of com.google.gwt.user.rebind.rpc.SerializableTypeOracleBuilder$TypeInfoComputed$SerializationIssue

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.