public abstract class AbstractGenerator extends Object implements TemplatingGenerator
| Constructor and Description |
|---|
AbstractGenerator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
embeddedTemplateExists(String name) |
String |
getCPResourcePath(String name) |
abstract boolean |
getEnableMinimalUpdate()
Is the minimal-file-update option enabled?
|
String |
getFullTemplateFile(CodegenConfig config,
String templateFile)
Get the template file path with template dir prepended, and use the
library template if exists.
|
Reader |
getTemplateReader(String name) |
String |
readResourceContents(String resourceFilePath) |
String |
readTemplate(String name) |
File |
writeToFile(String filename,
byte[] contents)
Write bytes to a file
|
File |
writeToFile(String filename,
String contents)
Write String to a file, formatting as UTF-8
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFullTemplateContents, getFullTemplatePathpublic abstract boolean getEnableMinimalUpdate()
public File writeToFile(String filename, String contents) throws IOException
filename - The name of file to writecontents - The contents string.IOException - If file cannot be written.public File writeToFile(String filename, byte[] contents) throws IOException
filename - The name of file to writecontents - The contents bytes. Typically this is a UTF-8 formatted string.IOException - If file cannot be written.public String getFullTemplateFile(CodegenConfig config, String templateFile)
config - Codegen configtemplateFile - Template filepublic boolean embeddedTemplateExists(String name)
Copyright © 2019. All rights reserved.