类 MethodCode
java.lang.Object
com.baidu.bjf.remoting.protobuf.code.MethodCode
Java method code creator.
- 从以下版本开始:
- 1.10.3
- 作者:
- xiemalin
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddException(String exception) Adds the exception.voidaddParameter(String type, String name) Adds the parameter.voidappendLineCode0(String line) append a new line code to method without need to append ";" to the end.voidappendLineCode1(String line) append a new line code to method with end with ";" .voidSets the name.voidsetReturnType(String returnType) Sets the return type.voidSets the scope.toCode()To code.
-
构造器详细资料
-
MethodCode
public MethodCode()
-
-
方法详细资料
-
toCode
To code.- 返回:
- the string
-
setScope
Sets the scope.- 参数:
scope- the new scope
-
setName
Sets the name.- 参数:
name- the new name
-
setReturnType
Sets the return type.- 参数:
returnType- the new return type
-
addParameter
Adds the parameter.- 参数:
type- the typename- the name
-
addException
Adds the exception.- 参数:
exception- the exception
-
appendLineCode0
append a new line code to method without need to append ";" to the end.- 参数:
line- the line
-
appendLineCode1
append a new line code to method with end with ";" .- 参数:
line- the line
-