|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.taursys.tools.CodeGenerator
CodeGenerator is a singleton which generates code using Velocity
| Field Summary | |
static java.lang.String |
TEMPLATES_PATH
|
| Method Summary | |
void |
generateCode(java.lang.String templateName,
org.apache.velocity.context.Context context,
java.lang.String srcPath,
java.lang.String packageName,
java.lang.String className)
Generates the source code using the Velocity Engine and the template |
static CodeGenerator |
getInstance()
Gets the singleton instance of the CodeGenerator. |
void |
initialize()
Initializes the CodeGenerator engine if not already initialized Initializes the internal VelocityEngine with this CodeGenerator's properties. |
void |
setProperties(java.util.Properties properties)
Sets all properties used by this CodeGenerator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TEMPLATES_PATH
| Method Detail |
public void setProperties(java.util.Properties properties)
public static CodeGenerator getInstance()
public void initialize()
throws java.lang.Exception
java.lang.Exception - if problem initializing the engine
public void generateCode(java.lang.String templateName,
org.apache.velocity.context.Context context,
java.lang.String srcPath,
java.lang.String packageName,
java.lang.String className)
throws java.lang.Exception
templateName - to produce Java codecontext - which contains data to merge into templatesrcPath - is path where source should be storedpackageName - is java package name which whill be appended to srcPathclassName - is java class name and file name
java.lang.Exception - if problem creating file or running template
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||