public class MethodCode extends Object
| 构造器和说明 |
|---|
MethodCode() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addException(String exception)
Adds the exception.
|
void |
addParameter(String type,
String name)
Adds the parameter.
|
void |
appendLineCode0(String line)
append a new line code to method without need to append ";" to the end.
|
void |
appendLineCode1(String line)
append a new line code to method with end with ";" .
|
void |
setName(String name)
Sets the name.
|
void |
setReturnType(String returnType)
Sets the return type.
|
void |
setScope(String scope)
Sets the scope.
|
String |
toCode()
To code.
|
public String toCode()
public void setScope(String scope)
scope - the new scopepublic void setName(String name)
name - the new namepublic void setReturnType(String returnType)
returnType - the new return typepublic void addParameter(String type, String name)
type - the typename - the namepublic void addException(String exception)
exception - the exceptionpublic void appendLineCode0(String line)
line - the linepublic void appendLineCode1(String line)
line - the lineCopyright © 2022 Baidu, Inc.. All rights reserved.