Class AbstractFileGenerator

java.lang.Object
de.haumacher.msgbuf.generator.util.AbstractFileGenerator
All Implemented Interfaces:
FileGenerator
Direct Known Subclasses:
AbstractDartGenerator, AbstractJavaGenerator

public abstract class AbstractFileGenerator extends Object implements FileGenerator
Base class for code generators.
  • Constructor Details

    • AbstractFileGenerator

      public AbstractFileGenerator()
  • Method Details

    • generate

      public void generate(Appendable out, int indent)
      Description copied from interface: FileGenerator
      Generates the file contents to the given Appendable.
      Specified by:
      generate in interface FileGenerator
      indent - The initial indentation level to start with.
    • include

      protected void include(FileGenerator other)
    • getIndent

      public int getIndent()
      The current indentation level.
    • generate

      protected abstract void generate()
    • docComment

      protected abstract void docComment(String comment)
    • line

      protected void line(String line)
    • line

      protected void line(String... parts)
    • lineStart

      protected void lineStart(String line)
    • append

      protected void append(String part)
    • nl

      protected void nl()