TemplateCodeGenerator@Deprecated public class CodeGenerator extends AbstractCodeGenerator
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_SUFFIX_CLASSNAME
已过时。
auto proxied suffix class name.
|
protected List<FieldInfo> |
fields
已过时。
The fields.
|
static String |
JAVA_CLASS_FILE_SUFFIX
已过时。
The Constant JAVA_CLASS_FILE_SUFFIX.
|
cls, debug, outputPath| 构造器和说明 |
|---|
CodeGenerator(Class<?> cls)
已过时。
Constructor method.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<FieldInfo> |
fetchFieldInfos()
已过时。
Fetch field infos.
|
protected String |
getAccessByField(String target,
Field field,
Class<?> cls)
已过时。
get field access code.
|
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. |
checkType, getFullClassName, getOutputPath, getPackage, getTargetProxyClassname, isDebug, setDebug, setOutputPathpublic static final String DEFAULT_SUFFIX_CLASSNAME
public static final String JAVA_CLASS_FILE_SUFFIX
public CodeGenerator(Class<?> cls)
fields - protobuf mapped fieldscls - protobuf mapped classpublic Set<Class<?>> getRelativeProxyClasses()
public String getClassName()
ICodeGeneratorgetClassName 在接口中 ICodeGeneratorgetClassName 在类中 AbstractCodeGeneratorpublic String getCode()
ICodeGeneratorprotected String getAccessByField(String target, Field field, Class<?> cls)
getAccessByField 在类中 AbstractCodeGeneratortarget - target instance namefield - java field instancecls - mapped classprotected 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.