Package rocket.generator.rebind

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


    Checker.notNull("parameter:serializables", serializables);
    Checker.notNull("parameter:typesToReaders", typesToReaders);

    final Set<Type> orderedSerializables = this.sortSerializablesIntoHeirarchyOrder(serializables);
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Creating necessary ObjectReaders.");

    final Iterator<Type> types = orderedSerializables.iterator();
    int skippedGeneratingCount = 0;
    final Set<Type> newReaders = new TreeSet<Type>(TypeComparator.INSTANCE);
View Full Code Here


      if (null != reader) {
        skippedGeneratingCount++;
        continue;
      }

      context.branch();
      final NewConcreteType newReader = this.createObjectReader(type, typesToReaders);
      typesToReaders.put(type, newReader);

      context.branch();
      this.overrideObjectReaderNewInstanceMethod(type, newReader);
View Full Code Here

      context.branch();
      final NewConcreteType newReader = this.createObjectReader(type, typesToReaders);
      typesToReaders.put(type, newReader);

      context.branch();
      this.overrideObjectReaderNewInstanceMethod(type, newReader);

      if (false == type.isArray()) {
        this.overrideObjectReaderReadFieldsMethod(newReader, type);
        this.overrideObjectReaderReadMethod(newReader, type);
View Full Code Here

    body.setType(type);

    // add all fields to the template
    final Iterator<Field> fields = this.filterSerializableFields(type.getFields()).iterator();
    int fieldCount = 0;
    context.branch();

    while (fields.hasNext()) {
      final Field field = fields.next();
      final Method setter = this.createFieldSetter(reader, field);
      body.addFieldSetter(setter);
View Full Code Here

    Checker.notNull("parameter:serializables", serializables);
    Checker.notNull("parameter:typesToWriters", typesToWriters);

    final Set<Type> orderedSerializables = this.sortSerializablesIntoHeirarchyOrder(serializables);
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Creating necessary ObjectWriters.");

    final Iterator<Type> types = orderedSerializables.iterator();
    int skippedGeneratingCount = 0;
    final Set<Type> newWriters = new TreeSet<Type>(TypeComparator.INSTANCE);
View Full Code Here

      if (null != writer) {
        skippedGeneratingCount++;
        continue;
      }

      context.branch();
      final NewConcreteType newWriter = this.createObjectWriter(type, typesToWriters);
      typesToWriters.put(type, newWriter);

      context.branch();
      this.overrideObjectWriterWrite0Method(newWriter, type);
View Full Code Here

      context.branch();
      final NewConcreteType newWriter = this.createObjectWriter(type, typesToWriters);
      typesToWriters.put(type, newWriter);

      context.branch();
      this.overrideObjectWriterWrite0Method(newWriter, type);
      this.addSingletonField(newWriter);

      context.unbranch();
      context.unbranch();
View Full Code Here

   */
  protected void verifyAsyncServiceInterface(final Type serviceInterface) {
    Checker.notNull("parameter:serviceInterface", serviceInterface);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Verifying async interface for : " + serviceInterface);

    try {
      final Type asyncServiceInterface = this.getAsyncServiceInterface(serviceInterface);

View Full Code Here

  protected NewConcreteType assembleNewType(final Type serviceInterface, final String newTypeName) {
    Checker.notNull("parameter:serviceInterface", serviceInterface);
    GeneratorHelper.checkJavaTypeName("parameter:TypeName", newTypeName);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();

    this.verifyServiceInterface(serviceInterface);
    this.verifyAsyncServiceInterface(serviceInterface);

    final NewConcreteType client = this.createRpcServiceClient(newTypeName, serviceInterface, this.getJsonRpcServiceClient());
View Full Code Here

  protected NewConcreteType subClassCometClient(final String newTypeName, final Type cometClient) {
    GeneratorHelper.checkJavaTypeName("parameter:newTypeName", newTypeName);
    Checker.notNull("parameter:cometClient", cometClient);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info(newTypeName);
    context.debug("extends " + cometClient.getName());
    context.debug("final");

    final NewConcreteType subClass = context.newConcreteType(newTypeName);
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.