Package rocket.generator.rebind.util

Examples of rocket.generator.rebind.util.StringBufferSourceWriter


    final String generatorName = this.getGeneratorContext().getGenerator().getClass().getName();
    comments = comments + "\n\nGenerated at " + date + " by " + generatorName;

    final MetaData metaData = this.getMetaData();

    final StringBufferSourceWriter writer = new StringBufferSourceWriter();
    while (true) {
      final boolean noComments = Tester.isNullOrEmpty(comments);
      final boolean noAnnotations = metaData.isEmpty();

      if (noComments && noAnnotations) {
        break;
      }

      // only has annotations...
      if (noComments && false == noAnnotations) {
        metaData.write(writer);
        break;
      }
      // only has comments...
      if (noComments && false == noAnnotations) {
        writer.println(comments);
        break;
      }

      // must have both annotations and comments...
      writer.println(comments);
      writer.println();
      metaData.write(writer);
      break;
    }

    composerFactory.setJavaDocCommentForClass(writer.getBuffer().toString());
  }
View Full Code Here


  protected String asString(final CodeBlock codeBlock) {
    Checker.notNull("parameter:codeBlock", codeBlock);

    String string = "";
    if (false == codeBlock.isEmpty()) {
      final StringBufferSourceWriter writer = new StringBufferSourceWriter();
      codeBlock.write(writer);
      string = writer.getBuffer();
    }
    return string;
  }
View Full Code Here

TOP

Related Classes of rocket.generator.rebind.util.StringBufferSourceWriter

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.