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.
|
CLASS_JOINER, DEFAULT_SUFFIX_CLASSNAME, JAVA_CLASS_FILE_SUFFIX, JAVA_END, JAVA_LINE_BREAK, LINE_BREAK, PACKAGE_SPLIT| 构造器和说明 |
|---|
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,
boolean wildcardType)
get field access code.
|
void |
getAllDependenciesClasses(Set<Class> list)
Gets the all dependencies classes.
|
String |
getClassName()
Gets the class name.
|
Set<Class> |
getDependenciesClasses()
Gets the dependencies classes.
|
Set<Class> |
getDependenciesClasses(Class cls)
Gets the dependencies classes.
|
Set<Class> |
getDependenciesClasses(List<FieldInfo> fields)
Gets the dependencies classes.
|
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.
|
void |
setOutputPath(File outputPath)
Sets the output 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)
cls - the clspublic void getAllDependenciesClasses(Set<Class> list)
list - the listpublic Set<Class> getDependenciesClasses(Class cls)
cls - the clspublic Set<Class> getDependenciesClasses()
public Set<Class> getDependenciesClasses(List<FieldInfo> fields)
fields - the fieldsprotected String getTargetProxyClassname()
public void setOutputPath(File outputPath)
setOutputPath 在接口中 ICodeGeneratoroutputPath - the new output pathprotected File getOutputPath()
public boolean isDebug()
isDebug 在接口中 ICodeGeneratorpublic void setDebug(boolean debug)
setDebug 在接口中 ICodeGeneratordebug - the new debugICodeGenerator.getCode()public String getClassName()
getClassName 在接口中 ICodeGeneratorpublic String getPackage()
getPackage 在接口中 ICodeGeneratorpublic String getFullClassName()
getFullClassName 在接口中 ICodeGeneratorprotected void checkType(FieldType type, Field field)
type - the typefield - the fieldCopyright © 2022 Baidu, Inc.. All rights reserved.