|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--xcodegen.generator.AbstractCodeGenerator
|
+--xcodegen.generator.bean.AbstractBeanCodeGenerator
Base class of JavaBean code generators
| Field Summary |
| Fields inherited from interface xcodegen.generator.CodeGenerator |
CONFIG_CLASS_OUTPUT_DIR, CONFIG_CLASS_PREFIX, CONFIG_CLASS_SUFFIX, CONFIG_DATABASE, CONFIG_DATABASE_OUTPUT_DIR, CONFIG_DATABASE_OUTPUT_FILE, CONFIG_DATABASE_STRING_SIZE, CONFIG_LANGUAGE, CONFIG_PACKAGE_SUFFIX, VERSION |
| Constructor Summary | |
AbstractBeanCodeGenerator(java.lang.String name)
Create a new BeanCodeGenerator |
|
| Method Summary | |
protected void |
generate(XClass clazz,
org.apache.velocity.VelocityContext context,
org.apache.velocity.Template template)
Generate the code of a class |
protected void |
generate(XPackage pkg,
org.apache.velocity.VelocityContext context,
org.apache.velocity.Template template)
Generate the code of a package |
java.lang.String |
getClassname(XClass clazz)
Return the name of a class by adding a prefix and a suffix |
java.lang.String |
getPackagename(XPackage pkg)
Return the name of a package by adding a suffix |
java.lang.String |
getType(java.lang.String type)
Return the type for the targeted language |
java.lang.String |
getVelocityTemplatePath()
Return the path the the template |
void |
init(java.util.Properties config)
Initialize the code generator |
| Methods inherited from class xcodegen.generator.AbstractCodeGenerator |
generate, getConfigProperty, getLogger, getName, getVelocityContext, getVelocityTemplate, loadResourceAsProperties |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractBeanCodeGenerator(java.lang.String name)
name - name of the code generator| Method Detail |
public java.lang.String getPackagename(XPackage pkg)
pkg -
public java.lang.String getClassname(XClass clazz)
clazz - Class
public java.lang.String getType(java.lang.String type)
type - type name
public void init(java.util.Properties config)
throws XCodeGenException
CodeGenerator
init in interface CodeGeneratorinit in class AbstractCodeGeneratorconfig - Configuration of the code generator
XCodeGenException - if any error occurs during the initializationpublic java.lang.String getVelocityTemplatePath()
AbstractCodeGenerator
getVelocityTemplatePath in class AbstractCodeGenerator
protected void generate(XPackage pkg,
org.apache.velocity.VelocityContext context,
org.apache.velocity.Template template)
throws XCodeGenException,
java.io.IOException
AbstractCodeGenerator
generate in class AbstractCodeGeneratorpkg - Package to generatecontext - Velocity contexttemplate - Template used for generating the code
XCodeGenException - If any error occurs during the code generation
java.io.IOException
protected void generate(XClass clazz,
org.apache.velocity.VelocityContext context,
org.apache.velocity.Template template)
throws XCodeGenException,
java.io.IOException
AbstractCodeGenerator
generate in class AbstractCodeGeneratorclazz - Class to generatecontext - Velocity contexttemplate - Template used for generating the code
XCodeGenException - If any error occurs during the code generation
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||