Package rocket.generator.rebind

Examples of rocket.generator.rebind.GeneratorContext.debug()


  protected NewConcreteType createObjectWriter(final Type type, final Map serializables) {
    Checker.notNull("parameter:type", type);
    Checker.notNull("parameter:serializables", serializables);

    final GeneratorContext context = this.getGeneratorContext();
    context.debug(type.getName());

    final String newTypeName = this.getGeneratedTypeName(type, SerializationConstants.OBJECT_WRITER_GENERATED_TYPE_SUFFIX,
        "rocket.serialization.client.writer");
    final NewConcreteType newConcreteType = context.newConcreteType(newTypeName);
    newConcreteType.setAbstract(false);
View Full Code Here


        "rocket.serialization.client.writer");
    final NewConcreteType newConcreteType = context.newConcreteType(newTypeName);
    newConcreteType.setAbstract(false);
    newConcreteType.setFinal(false);

    context.debug(newTypeName);

    // check super class of type. if its not object extend its object writer
    // rather than cowi.
    Type objectWriterSuperType = null;
View Full Code Here

      }
      break;
    }

    newConcreteType.setSuperType(objectWriterSuperType);
    context.debug("extends " + objectWriterSuperType);

    newConcreteType.addMetaData(SerializationConstants.SERIALIZABLE_TYPE, type.getName());

    final NewConstructor constructor = newConcreteType.newConstructor();
    constructor.setBody(EmptyCodeBlock.INSTANCE);
View Full Code Here

    if (type.getComponentType() == context.getLong()) {
      newMethod.addMetaData("com.google.gwt.core.client.UnsafeNativeLong", "");
    }

    context.debug("Overridden " + newMethod);
  }

  protected void overrideObjectWriterWrite0MethodForNonArrayType(final NewConcreteType writer, final Type type) {
    Checker.notNull("parameter:writer", writer);
    Checker.notNull("parameter:type", type);
View Full Code Here

    final WriteTemplatedFile body = new WriteTemplatedFile();
    body.setType(type);
    newMethod.setBody(body);

    newMethod.addMetaData(com.google.gwt.core.client.UnsafeNativeLong.class.getName(), "");
    context.debug("Overridden " + newMethod);
  }

  protected void overrideObjectWriterWriteFieldsMethod(final NewConcreteType writer, final Type type) {
    Checker.notNull("parameter:writer", writer);
    Checker.notNull("parameter:type", type);
View Full Code Here

      fieldCount++;
    }

    context.unbranch();
    context.debug("Overridden " + newMethod);
  }

  /**
   * Creates a private method that uses jsni to retrieve the value of a field.
   * Each and every serializable field will have a typed getter to retrieve
View Full Code Here

    final NewMethodParameter instance = method.newParameter();
    instance.setFinal(true);
    instance.setName(SerializationConstants.CLIENT_OBJECT_WRITER_IMPL_FIELD_GETTER_INSTANCE_PARAMETER);
    instance.setType(field.getEnclosingType());

    context.debug(field.getName());
    return method;
  }

  /**
   * This comparator may be used to sort a collection so that types closer to
View Full Code Here

    Checker.notNull("parameter:serializationFactory", serializationFactory);
    Checker.notNull("parameter:objectReaders", objectReaders);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.debug("Overriding \"" + SerializationConstants.SERIALIZATION_FACTORY_GET_OBJECT_READER
        + "\" to register needed ObjectReaders.");

    final Method method = serializationFactory.getMostDerivedMethod(SerializationConstants.SERIALIZATION_FACTORY_GET_OBJECT_READER,
        Collections.nCopies(1, context.getString()));
    final NewMethod newMethod = method.copy(serializationFactory);
View Full Code Here

      final Type objectReader = entry.getValue();
      final Field objectReaderSingleton = objectReader.getField(SerializationConstants.SINGLETON);

      body.register(type, objectReaderSingleton);

      context.debug(type.getName() + " = " + objectReader.getName());
    }

    newMethod.setBody(body);

    context.unbranch();
View Full Code Here

    Checker.notNull("parameter:serializationFactory", serializationFactory);
    Checker.notNull("parameter:objectWriters", objectWriters);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.debug("Overriding \"" + SerializationConstants.SERIALIZATION_FACTORY_GET_OBJECT_WRITER
        + "\" to register needed ObjectWriters.");

    final Method method = serializationFactory.getMostDerivedMethod(SerializationConstants.SERIALIZATION_FACTORY_GET_OBJECT_WRITER,
        Collections.nCopies(1, context.getString()));
    final NewMethod newMethod = method.copy(serializationFactory);
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.