public class Method extends JavaElement
| 构造器和说明 |
|---|
Method()
Instantiates a new method.
|
Method(Method original)
Copy constructor.
|
Method(String name)
Instantiates a new method.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addBodyLine(int index,
String line)
Adds the body line.
|
void |
addBodyLine(String line)
Adds the body line.
|
void |
addBodyLines(Collection<String> lines)
Adds the body lines.
|
void |
addBodyLines(int index,
Collection<String> lines)
Adds the body lines.
|
void |
addException(FullyQualifiedJavaType exception)
Adds the exception.
|
void |
addParameter(int index,
Parameter parameter)
Adds the parameter.
|
void |
addParameter(Parameter parameter)
Adds the parameter.
|
List<String> |
getBodyLines()
Gets the body lines.
|
List<FullyQualifiedJavaType> |
getExceptions()
Gets the exceptions.
|
String |
getFormattedContent(int indentLevel,
boolean interfaceMethod,
CompilationUnit compilationUnit)
Gets the formatted content.
|
String |
getName()
Gets the name.
|
List<Parameter> |
getParameters()
Gets the parameters.
|
FullyQualifiedJavaType |
getReturnType()
Gets the return type.
|
boolean |
isConstructor()
Checks if is constructor.
|
boolean |
isNative()
Checks if is native.
|
boolean |
isSynchronized()
Checks if is synchronized.
|
void |
setConstructor(boolean constructor)
Sets the constructor.
|
void |
setName(String name)
Sets the name.
|
void |
setNative(boolean isNative)
Sets the native.
|
void |
setReturnType(FullyQualifiedJavaType returnType)
Sets the return type.
|
void |
setSynchronized(boolean isSynchronized)
Sets the synchronized.
|
addAnnotation, addFormattedAnnotations, addFormattedJavadoc, addJavaDocLine, addSuppressTypeWarningsAnnotation, getAnnotations, getJavaDocLines, getVisibility, isFinal, isStatic, setFinal, setStatic, setVisibilitypublic Method()
public Method(String name)
name - the namepublic Method(Method original)
original - the originalpublic void addBodyLine(String line)
line - the linepublic void addBodyLine(int index,
String line)
index - the indexline - the linepublic void addBodyLines(Collection<String> lines)
lines - the linespublic void addBodyLines(int index,
Collection<String> lines)
index - the indexlines - the linespublic String getFormattedContent(int indentLevel, boolean interfaceMethod, CompilationUnit compilationUnit)
indentLevel - the indent levelinterfaceMethod - the interface methodcompilationUnit - the compilation unitpublic boolean isConstructor()
public void setConstructor(boolean constructor)
constructor - The constructor to set.public String getName()
public void setName(String name)
name - The name to set.public void addParameter(Parameter parameter)
parameter - the parameterpublic void addParameter(int index,
Parameter parameter)
index - the indexparameter - the parameterpublic FullyQualifiedJavaType getReturnType()
public void setReturnType(FullyQualifiedJavaType returnType)
returnType - The returnType to set.public List<FullyQualifiedJavaType> getExceptions()
public void addException(FullyQualifiedJavaType exception)
exception - the exceptionpublic boolean isSynchronized()
public void setSynchronized(boolean isSynchronized)
isSynchronized - the new synchronizedpublic boolean isNative()
public void setNative(boolean isNative)
isNative - the new nativeCopyright © 2006–2016 MyBatis.org. All rights reserved.