类 ClassCode
java.lang.Object
com.baidu.bjf.remoting.protobuf.code.ClassCode
Java class code creator.
- 从以下版本开始:
- 1.10.3
- 作者:
- xiemalin
-
字段概要
字段修饰符和类型字段说明static final StringBLANK_STRING.static final StringThe Constant CODE_FORMAT.static final Stringjava line end.static final Stringline break for JAVA.static final StringThe Constant KEY_CLASS.static final Stringline break for editor.static final StringThe Constant PACKAGE_SPLIT.static final StringThe Constant SCOPE_DEFAULT.static final StringThe Constant SCOPE_PROTECTED.static final StringThe Constant SCOPE_PUBLIC.static final StringThe Constant SENTENCE_COMMA. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddExtendClass(String cls) Adds the extend class.voidAdds the field.voidaddInteface(String intf) Adds the inteface.addMethod(MethodCode mc) Add a method to java source code.voidimportClass(String importClass) Import java class.voidsetClassName(String className) Sets the class name.voidSets the pkg.toCode()To code.
-
字段详细资料
-
LINE_BREAK
line break for editor.- 另请参阅:
-
JAVA_END
java line end.- 另请参阅:
-
JAVA_LINE_BREAK
line break for JAVA.- 另请参阅:
-
PACKAGE_SPLIT
The Constant PACKAGE_SPLIT.- 另请参阅:
-
SENTENCE_COMMA
The Constant SENTENCE_COMMA.- 另请参阅:
-
BLANK_STRING
BLANK_STRING.- 另请参阅:
-
KEY_CLASS
The Constant KEY_CLASS.- 另请参阅:
-
SCOPE_PUBLIC
The Constant SCOPE_PUBLIC.- 另请参阅:
-
SCOPE_PROTECTED
The Constant SCOPE_PROTECTED.- 另请参阅:
-
SCOPE_DEFAULT
The Constant SCOPE_DEFAULT.- 另请参阅:
-
CODE_FORMAT
The Constant CODE_FORMAT.- 另请参阅:
-
-
构造器详细资料
-
ClassCode
Instantiates a new class code.- 参数:
scope- the scopename- the nameinterfaces- the interfacesextendClasses- the extend classes
-
ClassCode
Instantiates a new class code.- 参数:
scope- the scopename- the name
-
-
方法详细资料
-
addField
Adds the field.- 参数:
scope- the scopetype- the typename- the namedefaultValue- the default value
-
toCode
To code.- 返回:
- the string
-
importClass
Import java class.- 参数:
importClass- imported java class
-
addMethod
Add a method to java source code.- 参数:
mc- method code- 返回:
ClassCodeinstance
-
setPkg
Sets the pkg.- 参数:
pkg- the new pkg
-
setClassName
Sets the class name.- 参数:
className- the new class name
-
addInteface
Adds the inteface.- 参数:
intf- the intf
-
addExtendClass
Adds the extend class.- 参数:
cls- the cls
-