public class PrologCodeWriter extends FilterCodeWriter
Constructor and Description |
---|
PrologCodeWriter(AbstractCodeWriter aCore,
String prolog) |
Modifier and Type | Method and Description |
---|---|
SourcePrintWriter |
openSource(JPackage pkg,
String fileName)
Called by CodeModel to store the specified file.
|
close, core, openBinary
encoding, getDefaultNewLine, getNewLine
public PrologCodeWriter(@Nonnull AbstractCodeWriter aCore, @Nullable String prolog)
aCore
- This CodeWriter will be used to actually create a storage for files.
PrologCodeWriter simply decorates this underlying CodeWriter by
adding prolog comments.prolog
- Strings that will be added as comments. This string may contain
newlines to produce multi-line comments. '//' will be inserted at
the beginning of each line to make it a valid Java comment, so the
caller can just pass strings like "abc\ndef"public SourcePrintWriter openSource(@Nonnull JPackage pkg, @Nonnull String fileName) throws IOException
AbstractCodeWriter
openSource
in class FilterCodeWriter
pkg
- The package of the file to be written.fileName
- File name without the path. Something like "Foo.java" or
"Bar.properties"IOException
- On IO errorCopyright © 2013–2017 Philip Helger. All rights reserved.