Class AbstractFileGenerator
java.lang.Object
de.haumacher.msgbuf.generator.util.AbstractFileGenerator
- All Implemented Interfaces:
FileGenerator
- Direct Known Subclasses:
AbstractDartGenerator,AbstractJavaGenerator
Base class for code generators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected abstract voiddocComment(String comment) protected abstract voidgenerate()voidgenerate(Appendable out, int indent) Generates the file contents to the givenAppendable.intThe current indentation level.protected voidinclude(FileGenerator other) protected voidprotected voidprotected voidprotected voidnl()
-
Constructor Details
-
AbstractFileGenerator
public AbstractFileGenerator()
-
-
Method Details
-
generate
Description copied from interface:FileGeneratorGenerates the file contents to the givenAppendable.- Specified by:
generatein interfaceFileGeneratorindent- The initial indentation level to start with.
-
include
-
getIndent
public int getIndent()The current indentation level. -
generate
protected abstract void generate() -
docComment
-
line
-
line
-
lineStart
-
append
-
nl
protected void nl()
-