public class SourceGenerator
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
private freemarker.template.Configuration |
config |
static java.lang.String |
CONTROLLER_BASE_PACKAGE |
static java.lang.String |
CONTROLLER_SUFFIX |
static java.lang.String |
DAO_BASE_PACKAGE |
static java.lang.String |
DAO_SUFFIX |
static java.lang.String |
DIRECTIVE_BASE_PACKAGE |
static java.lang.String |
DIRECTIVE_SUFFIX |
static java.lang.String |
ENTITY_BASE_PACKAGE |
static java.lang.String |
JAVA_BASE_PATH |
protected static org.apache.commons.logging.Log |
log |
static java.lang.String |
SERVICE_BASE_PACKAGE |
static java.lang.String |
SERVICE_SUFFIX |
static java.lang.String |
TEMPLATE_BASE_PATH |
static java.lang.String |
WEB_BASE_PATH |
构造器和说明 |
---|
SourceGenerator() |
限定符和类型 | 方法和说明 |
---|---|
void |
generate(java.lang.Class<?> c,
java.lang.String basePackage,
boolean overwrite)
生成某个实体类的代码
|
void |
generate(java.lang.String basePackage,
boolean overwrite)
生成所有实体类的代码
|
void |
generate(java.lang.String basePackage,
java.lang.String entityPackage,
boolean overwrite)
生成某个包所有实体类的代码
|
static void |
main(java.lang.String[] arg) |
protected static final org.apache.commons.logging.Log log
public static final java.lang.String ENTITY_BASE_PACKAGE
public static final java.lang.String DAO_BASE_PACKAGE
public static final java.lang.String DAO_SUFFIX
public static final java.lang.String SERVICE_BASE_PACKAGE
public static final java.lang.String SERVICE_SUFFIX
public static final java.lang.String DIRECTIVE_BASE_PACKAGE
public static final java.lang.String DIRECTIVE_SUFFIX
public static final java.lang.String CONTROLLER_BASE_PACKAGE
public static final java.lang.String CONTROLLER_SUFFIX
public static final java.lang.String JAVA_BASE_PATH
public static final java.lang.String WEB_BASE_PATH
public static final java.lang.String TEMPLATE_BASE_PATH
private freemarker.template.Configuration config
public static void main(java.lang.String[] arg) throws java.lang.ClassNotFoundException, java.io.IOException
arg
- java.lang.ClassNotFoundException
java.io.IOException
public void generate(java.lang.String basePackage, boolean overwrite) throws java.lang.ClassNotFoundException, java.io.IOException
basePackage
- overwrite
- java.lang.ClassNotFoundException
java.io.IOException
public void generate(java.lang.String basePackage, java.lang.String entityPackage, boolean overwrite) throws java.lang.ClassNotFoundException, java.io.IOException
basePackage
- entityPackage
- overwrite
- java.io.IOException
java.lang.ClassNotFoundException
public void generate(java.lang.Class<?> c, java.lang.String basePackage, boolean overwrite)
c
- basePackage
- overwrite
-