public class MethodBuilder extends BodyBuilderBase
| Modifier and Type | Field and Description |
|---|---|
private org.eclipse.jdt.core.dom.MethodDeclaration |
m_method
Method invocation.
|
m_declaration, m_sourcem_ast| Constructor and Description |
|---|
MethodBuilder(ClassBuilder source,
org.eclipse.jdt.core.dom.MethodDeclaration method)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jdt.core.dom.SingleVariableDeclaration |
addParameter(java.lang.String name,
java.lang.String type)
Add a method parameter.
|
org.eclipse.jdt.core.dom.SingleVariableDeclaration |
addParameter(java.lang.String name,
org.eclipse.jdt.core.dom.Type type)
Add a method parameter.
|
void |
addThrows(java.lang.String type)
Add an exception type to those thrown by the method.
|
BlockBuilder |
createBlock()
Create a block builder for the method body.
|
org.eclipse.jdt.core.dom.MethodDeclaration |
getDeclaration()
Get the method declaration.
|
addSourceComment, addSourceComment, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStaticnumberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteralprivate final org.eclipse.jdt.core.dom.MethodDeclaration m_method
public MethodBuilder(ClassBuilder source, org.eclipse.jdt.core.dom.MethodDeclaration method)
source - method - public org.eclipse.jdt.core.dom.MethodDeclaration getDeclaration()
public org.eclipse.jdt.core.dom.SingleVariableDeclaration addParameter(java.lang.String name,
org.eclipse.jdt.core.dom.Type type)
name - type - public org.eclipse.jdt.core.dom.SingleVariableDeclaration addParameter(java.lang.String name,
java.lang.String type)
name - type - fully-qualfied type name, or primitive name, with optional array suffixespublic void addThrows(java.lang.String type)
type - exception typepublic BlockBuilder createBlock()