Package rocket.generator.rebind

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


    this.createObjectReaders(serializableReadableTypes, typesToReaders);
    this.createObjectWriters(serializableWritableTypes, typesToWriters);

    // nows the time to create the SerializationFactory
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    final NewConcreteType serializationFactory = this.createSerializableFactory(newTypeName);

    this.overrideSerializationFactoryGetObjectReader(serializationFactory, typesToReaders);
    this.overrideSerializationFactoryGetObjectWriter(serializationFactory, typesToWriters);
    context.unbranch();
View Full Code Here


   *
   * @return A set containing all blacklisted packages.
   */
  protected Set<TypeMatcher> loadBlackLists() {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Attempting to load and merge all blacklists (unsorted).");

    final Set<TypeMatcher> blackLists = new HashSet<TypeMatcher>();

    final SubTypesVisitor packageVisitor = new SubTypesVisitor() {
View Full Code Here

   */
  protected Map<Type, Type> findAllReaders(final Set<Type> types) {
    Checker.notNull("parameter:types", types);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Finding existing ObjectReaders...");

    final ObjectReaderFinder finder = new ObjectReaderFinder() {
      @Override
      protected Type getImplementingInterface() {
View Full Code Here

  protected Map<Type, Type> findAllWriters(final Set<Type> types) {
    Checker.notNull("parameter:types", types);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Finding existing ObjectWriters...");

    final ObjectWriterFinder finder = new ObjectWriterFinder() {
      @Override
      protected Type getImplementingInterface() {
View Full Code Here

  protected Set<Type> getTypesFromAnnotation(final String title, final Type type, final String annotation) {
    Checker.notNull("parameter:type", type);
    Checker.notEmpty("parameter:annotation", annotation);

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

    final TreeSet<Type> types = new TreeSet<Type>(TypeComparator.INSTANCE);

    final Iterator<String> typeNames = type.getMetadataValues(annotation).iterator();
View Full Code Here

  protected Set<Type> findSerializableTypes(final Type type, final Map<Type, Type> typesToReadersOrWriters) {
    Checker.notNull("parameter:type", type);
    Checker.notNull("typesToReadersOrWriters", typesToReadersOrWriters);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Finding all serializable types reachable from " + type);

    final Type map = this.getMap();
    final Type list = this.getList();
    final Type set = this.getSet();
View Full Code Here

      @Override
      protected void visitType(final Type type) {
        if (false == SerializationFactoryGenerator.this.isOrHasSerializableSubType(type)) {
          SerializationFactoryGenerator.this.throwEncounteredUnserializableType(type);
        }
        context.branch();
        context.debug(type.getName());
        super.visitType(type);
        context.unbranch();
      }
View Full Code Here

        return !SerializationFactoryGenerator.this.isOrHasSerializableSubType(superType);
      }

      @Override
      protected void visitSuperType(final Type superType) {
        context.branch();
        context.debug(superType.getName());
        super.visitSuperType(superType);
        context.unbranch();
      }
View Full Code Here

        return !SerializationFactoryGenerator.this.isOrHasSerializableSubType(subType);
      }

      @Override
      protected void visitSubType(final Type subType) {
        context.branch();
        context.debug(subType.getName());
        super.visitSubType(subType);
        context.unbranch();
      }
View Full Code Here

       */
      @Override
      protected void visitField(final Field field) {
        Checker.notNull("parameter:field", field);

        context.branch();
        context.debug("Field: " + field.getName());

        while (true) {
          final Type fieldType = field.getType();

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.