Module org.jooq.codegen
Package org.jooq.codegen
Class GeneratorWriter<W extends GeneratorWriter<W>>
- java.lang.Object
-
- org.jooq.codegen.GeneratorWriter<W>
-
- Direct Known Subclasses:
JavaWriter,TextWriter
public abstract class GeneratorWriter<W extends GeneratorWriter<W>> extends Object
A wrapper for aPrintWriterThis wrapper postpones the actual write to the wrapped
PrintWriteruntil all information about the target Java class is available. This way, the import dependencies can be calculated at the end.- Author:
- Lukas Eder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeneratorWriter.CloseResult
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeneratorWriter(File file)protectedGeneratorWriter(File file, String encoding)protectedGeneratorWriter(File file, String encoding, Files files)protectedGeneratorWriter(File file, Files files)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringbeforeClose(String string)GeneratorWriter.CloseResultclose()Stringcontent()protected Stringencoding()Filefile()intindent()Windent(int tabs)WindentDec()WindentInc()StringnewlineString()voidnewlineString(String string)Wprint(char value)Wprint(int value)Wprint(String string)Wprint(String string, Object... args)Wprintln()Wprintln(int value)Wprintln(String string)Wprintln(String string, Object... args)WprintlnIf(boolean condition)intprintMarginForBlockComment()voidprintMarginForBlockComment(int i)Stringref(Class<?> clazz)Get a reference to aClass.Stringref(String clazzOrId)Get a reference to aClass.String[]ref(String[] clazzOrId)Get a reference to a list ofClass.protected String[]ref(String[] clazzOrId, int keepSegments)Get a reference to a list ofClass.protected Stringref(String clazzOrId, int keepSegments)Get a reference to aClass.List<String>ref(List<String> clazzOrId)Get a reference to a list ofClass.protected List<String>ref(List<String> clazzOrId, int keepSegments)Get a reference to a list ofClass.inttab()Wtab(int tabs)StringtabString()voidtabString(String string)StringtoString()
-
-
-
Method Detail
-
tabString
public String tabString()
-
tabString
public void tabString(String string)
-
newlineString
public String newlineString()
-
newlineString
public void newlineString(String string)
-
printMarginForBlockComment
public int printMarginForBlockComment()
-
printMarginForBlockComment
public void printMarginForBlockComment(int i)
-
file
public File file()
-
print
public W print(char value)
-
print
public W print(int value)
-
printlnIf
public W printlnIf(boolean condition)
-
println
public W println()
-
println
public W println(int value)
-
indentInc
public W indentInc()
-
indentDec
public W indentDec()
-
indent
public W indent(int tabs)
-
indent
public int indent()
-
tab
public W tab(int tabs)
-
tab
public int tab()
-
close
public GeneratorWriter.CloseResult close()
-
encoding
protected String encoding()
-
ref
public List<String> ref(List<String> clazzOrId)
Get a reference to a list ofClass.Subtypes may override this to generate import statements.
-
ref
protected String[] ref(String[] clazzOrId, int keepSegments)
Get a reference to a list ofClass.
-
ref
protected List<String> ref(List<String> clazzOrId, int keepSegments)
Get a reference to a list ofClass.Subtypes may override this to generate import statements.
-
content
public String content()
-
-