public abstract class EglPersistentTemplate extends EglTemplate
Modifier and Type | Field and Description |
---|---|
protected URI |
outputRoot |
protected String |
outputRootPath |
listeners, name, template
module
Constructor and Description |
---|
EglPersistentTemplate(EglTemplateSpecification spec,
IEglContext context,
URI outputRoot,
String outputRootPath) |
Modifier and Type | Method and Description |
---|---|
protected void |
addMessage(String message) |
protected abstract void |
doGenerate(File file,
String targetName,
boolean overwrite,
boolean protectRegions)
Store result of processing template in the given file.
|
void |
generate(String path)
The preferred way of generating code from a persistent template, this
stores the generation result in the given file, maintaining any protected
regions.
|
File |
generate(String path,
boolean overwrite,
boolean protectRegions)
Fully parameterised version of generate, usually only used internally.
|
protected String |
name(String path) |
protected File |
resolveFile(String path) |
void |
store(String path)
Deprecated.
Use generate(path) instead, or generate(path, false, false),
if you really know what you are doing :-)
|
void |
store(String path,
boolean overwrite)
Deprecated.
Use generate(path) instead, or generate(path, overwrite, false),
if you really know what you are doing :-)
|
addProtectedRegionWarning, getContents, getFormatter, getIncrementalitySettings, getName, getTemplate, isProcessed, merge, populate, process, reset, setFormatter, setFormatters, setFormatters, setIncrementalitySettings
getAst, getChildren, getDeclaredModelDefinitions, getDeclaredOperations, getImports, getModelDefinitions, getOperations, getParseProblems, printWarning
protected final URI outputRoot
protected final String outputRootPath
public EglPersistentTemplate(EglTemplateSpecification spec, IEglContext context, URI outputRoot, String outputRootPath) throws Exception
Exception
protected File resolveFile(String path) throws EglRuntimeException
EglRuntimeException
public void store(String path) throws EglRuntimeException
path
- EglRuntimeException
public void store(String path, boolean overwrite) throws EglRuntimeException
path
- overwrite
- EglRuntimeException
public void generate(String path) throws EglRuntimeException
path
- EglRuntimeException
public File generate(String path, boolean overwrite, boolean protectRegions) throws EglRuntimeException
path
- overwrite
- protectRegions
- EglRuntimeException
protected abstract void doGenerate(File file, String targetName, boolean overwrite, boolean protectRegions) throws EglRuntimeException
EglTemplate.contents
.path
- targetName
- overwrite
- protectRegions
- EglRuntimeException
protected void addMessage(String message)
Copyright © 2016. All rights reserved.