public abstract class AbstractTemplateSuiteGenerator extends Object implements TemplateSuiteGenerator
Constructor and Description |
---|
AbstractTemplateSuiteGenerator(org.apache.velocity.app.VelocityEngine velocityEngine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
generate(OutputLocator outputLocator,
String packageName,
TemplateSuite suite,
Map<String,String> parameters)
Generates the code.
|
protected abstract String |
getDirectoryName(String packageName,
TemplateSuite suite,
Map<String,String> parameters)
Calculates and returns the directory where the file will be written..
|
protected abstract String |
getFilename(String packageName,
TemplateSuite suite,
Map<String,String> parameters)
Calculates and returns the filename of the generated file.
|
protected abstract String |
getTemplatePath(String packageName,
TemplateSuite suite,
Map<String,String> parameters)
Calculates and returns the template path.
|
public AbstractTemplateSuiteGenerator(org.apache.velocity.app.VelocityEngine velocityEngine)
velocityEngine
- The Velocity engine.public void generate(OutputLocator outputLocator, String packageName, TemplateSuite suite, Map<String,String> parameters)
TemplateSuiteGenerator
generate
in interface TemplateSuiteGenerator
outputLocator
- The base directory where the code will be put.packageName
- The package name.suite
- The template suite.parameters
- Configuration parameters.protected abstract String getTemplatePath(String packageName, TemplateSuite suite, Map<String,String> parameters)
packageName
- The name of the package.suite
- The template suite.parameters
- The map of parameters.protected abstract String getFilename(String packageName, TemplateSuite suite, Map<String,String> parameters)
packageName
- The name of the package.suite
- The template suite.parameters
- The map of parameters.protected abstract String getDirectoryName(String packageName, TemplateSuite suite, Map<String,String> parameters)
packageName
- The name of the package.suite
- The template suite.parameters
- The map of parameters.Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.