public class MethodBuilder extends BodyBuilderBase
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(String name,
String type)
Add a method parameter.
|
org.eclipse.jdt.core.dom.SingleVariableDeclaration |
addParameter(String name,
org.eclipse.jdt.core.dom.Type type)
Add a method parameter.
|
void |
addThrows(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, stringLiteralpublic 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(String name, org.eclipse.jdt.core.dom.Type type)
name - type - public org.eclipse.jdt.core.dom.SingleVariableDeclaration addParameter(String name, String type)
name - type - fully-qualfied type name, or primitive name, with optional array suffixespublic void addThrows(String type)
type - exception typepublic BlockBuilder createBlock()
Copyright © 2005-2014 jibx.org. All Rights Reserved.