public class TemplateCodeGenerator extends AbstractCodeGenerator
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_SUFFIX_CLASSNAME
auto proxied suffix class name.
|
cls, debug, fields, outputPath| 构造器和说明 |
|---|
TemplateCodeGenerator(Class<?> cls)
Instantiates a new template code generator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getClassName()
Gets the class name.
|
String |
getCode()
Gets the code.
|
Set<Class<?>> |
getRelativeProxyClasses()
Gets the relative proxy classes.
|
protected String |
getSetToField(String target,
Field field,
Class<?> cls,
String express,
boolean isList,
boolean isMap)
generate access
Field value source code. support public field access, getter method access and reflection
access. |
protected void |
initDecodeMethodTemplateVariable() |
protected void |
initEncodeMethodTemplateVariable()
Inits the encode method template variable.
|
checkType, getAccessByField, getFullClassName, getOutputPath, getPackage, getTargetProxyClassname, isDebug, setDebug, setOutputPathpublic TemplateCodeGenerator(Class<?> cls)
cls - the clspublic String getClassName()
ICodeGeneratorgetClassName 在接口中 ICodeGeneratorgetClassName 在类中 AbstractCodeGeneratorpublic String getCode()
ICodeGeneratorprotected void initEncodeMethodTemplateVariable()
protected void initDecodeMethodTemplateVariable()
public Set<Class<?>> getRelativeProxyClasses()
protected String getSetToField(String target, Field field, Class<?> cls, String express, boolean isList, boolean isMap)
Field value source code. support public field access, getter method access and reflection
access.target - the targetfield - the fieldcls - the clsexpress - the expressisList - the is listisMap - the is mapCopyright © 2019 Baidu, Inc.. All rights reserved.