org.javagen.agile.core.emitter.template
Class VelocityCodeGenerator
java.lang.Object
org.javagen.agile.core.emitter.template.VelocityCodeGenerator
- All Implemented Interfaces:
- TemplateGenerator
public class VelocityCodeGenerator
- extends Object
- implements TemplateGenerator
Velocity template implementation.
- Author:
- Richard Easterling
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TEMPLATE_LOCATION_PATH
public static final String DEFAULT_TEMPLATE_LOCATION_PATH
- See Also:
- Constant Field Values
TEMPLATE_FILE_EXTENSION
public static final String TEMPLATE_FILE_EXTENSION
- See Also:
- Constant Field Values
VELOCITY_PROPERTIES_FILE
public static final String VELOCITY_PROPERTIES_FILE
- See Also:
- Constant Field Values
templateBasePath
protected String templateBasePath
vengine
org.apache.velocity.app.VelocityEngine vengine
writerFactory
protected WriterFactory writerFactory
tempTemplate
String tempTemplate
VelocityCodeGenerator
public VelocityCodeGenerator()
gen
public void gen(String templatePath,
File outFile,
Map<String,Object> context)
- Process templates.
- Specified by:
gen in interface TemplateGenerator
- Parameters:
templatePath - relative to templateBasePathoutFile - output filecontext - usualy a combined context based on current model node.
getTemplateBasePath
public String getTemplateBasePath()
- Description copied from interface:
TemplateGenerator
- Base path of template locations.
- Specified by:
getTemplateBasePath in interface TemplateGenerator
setTemplateBasePath
public void setTemplateBasePath(String templateBasePath)
setWriterFactory
public void setWriterFactory(WriterFactory writerFactory)
- Description copied from interface:
TemplateGenerator
- Provide a hook for tools to intercept the output sinks.
- Specified by:
setWriterFactory in interface TemplateGenerator
getWriterFactory
public WriterFactory getWriterFactory()
Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.