public abstract class AbstractCodeGenerator extends Object implements ICodeGenerator
ICodeGenerator implements.| 限定符和类型 | 字段和说明 |
|---|---|
protected Class<?> |
cls
The cls.
|
protected boolean |
debug
The debug.
|
protected List<FieldInfo> |
fields
The fields.
|
protected File |
outputPath
The output path.
|
| 构造器和说明 |
|---|
AbstractCodeGenerator(Class<?> cls)
Instantiates a new abstract code generator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
checkType(FieldType type,
Field field)
|
protected String |
getAccessByField(String target,
Field field,
Class<?> cls)
get field access code.
|
String |
getClassName()
Gets the class name.
|
String |
getFullClassName()
Gets the full class name.
|
protected File |
getOutputPath()
Gets the output path.
|
String |
getPackage()
Gets the package.
|
protected String |
getTargetProxyClassname()
Gets the target proxy classname.
|
boolean |
isDebug()
Checks if is debug.
|
void |
setDebug(boolean debug)
Sets the debug. if enabled print out source code after generated
|
void |
setOutputPath(File outputPath)
Sets the output path. if set should write generated source code to target path
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCode, getRelativeProxyClassesprotected boolean debug
protected File outputPath
protected Class<?> cls
public AbstractCodeGenerator(Class<?> cls)
fields - the fieldscls - the clsprotected String getTargetProxyClassname()
public void setOutputPath(File outputPath)
ICodeGeneratorsetOutputPath 在接口中 ICodeGeneratoroutputPath - the new output pathprotected File getOutputPath()
public boolean isDebug()
ICodeGeneratorisDebug 在接口中 ICodeGeneratorpublic void setDebug(boolean debug)
ICodeGeneratorsetDebug 在接口中 ICodeGeneratordebug - the new debugICodeGenerator.getCode()public String getClassName()
ICodeGeneratorgetClassName 在接口中 ICodeGeneratorpublic String getPackage()
ICodeGeneratorgetPackage 在接口中 ICodeGeneratorpublic String getFullClassName()
ICodeGeneratorgetFullClassName 在接口中 ICodeGeneratorprotected void checkType(FieldType type, Field field)
type - the typefield - the fieldCopyright © 2019 Baidu, Inc.. All rights reserved.