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