Package rocket.generator.rebind

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


          }
          if (set.equals(fieldType)) {
            this.processInterface(fieldType);

            final Type elementType = SerializationFactoryGenerator.this.getTypeFromAnnotation(field);
            context.debug(elementType + " (Set)");
            this.visitType(elementType);
            break;
          }
          if (map.equals(fieldType)) {
            this.processInterface(fieldType);
View Full Code Here


          if (map.equals(fieldType)) {
            this.processInterface(fieldType);

            final Type keyType = SerializationFactoryGenerator.this.getTypeFromAnnotation(field, 0);
            final Type valueType = SerializationFactoryGenerator.this.getTypeFromAnnotation(field, 1);
            context.debug(keyType + " (Map key)");
            context.debug(valueType + " (Map value)");

            this.visitType(keyType);
            this.visitType(valueType);
            break;
View Full Code Here

            this.processInterface(fieldType);

            final Type keyType = SerializationFactoryGenerator.this.getTypeFromAnnotation(field, 0);
            final Type valueType = SerializationFactoryGenerator.this.getTypeFromAnnotation(field, 1);
            context.debug(keyType + " (Map key)");
            context.debug(valueType + " (Map value)");

            this.visitType(keyType);
            this.visitType(valueType);
            break;
          }
View Full Code Here

    final Set<Type> found = visitor.getConcreteTypes();

    found.remove(context.getString());
    found.remove(context.getObject());
    context.debug("Removing special cases types \"java.lang.Object\" and \"java.lang.String\".");

    context.unbranch();
    return found;
  }
View Full Code Here

   * @param newtypesToReaders
   * @return
   */
  protected NewConcreteType createObjectReader(final Type type, final Map<Type, Type> typesToReaders) {
    final GeneratorContext context = this.getGeneratorContext();
    context.debug(type.getName());

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

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

    context.debug(newTypeName);

    // pick the right super type.
    Type objectReaderSuperType = null;

    while (true) {
View Full Code Here

      }
      break;
    }

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

    // add an annotation that marks the type being handled by this
    // ObjectReader
    newConcreteType.addMetaData(SerializationConstants.SERIALIZABLE_TYPE, type.getName());
View Full Code Here

    final NewArrayInstanceTemplatedFile populateNewArray = new NewArrayInstanceTemplatedFile();
    populateNewArray.setType(arrayType.getComponentType());
    newMethod.setBody(populateNewArray);

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

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

      }
    };

    newMethod.setBody(returnStatement);

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

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

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

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

  protected void overrideObjectReaderReadFieldsMethod(final NewConcreteType reader, final Type type) {
    Checker.notNull("parameter:reader", reader);
    Checker.notNull("parameter:type", type);
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.