|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibx.schema.codegen.ASTBuilderBase
org.jibx.schema.codegen.BodyBuilderBase
org.jibx.schema.codegen.MethodBuilder
public class MethodBuilder
Abstract syntax tree method declaration builder. This adds convenience methods and control information to the base builder.
Field Summary | |
---|---|
private MethodDeclaration |
m_method
Method invocation. |
Fields inherited from class org.jibx.schema.codegen.BodyBuilderBase |
---|
m_declaration, m_source |
Fields inherited from class org.jibx.schema.codegen.ASTBuilderBase |
---|
m_ast |
Constructor Summary | |
---|---|
MethodBuilder(ClassBuilder source,
MethodDeclaration method)
Constructor. |
Method Summary | |
---|---|
SingleVariableDeclaration |
addParameter(java.lang.String name,
java.lang.String type)
Add a method parameter. |
SingleVariableDeclaration |
addParameter(java.lang.String name,
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. |
MethodDeclaration |
getDeclaration()
Get the method declaration. |
Methods inherited from class org.jibx.schema.codegen.BodyBuilderBase |
---|
addSourceComment, addSourceComment, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic |
Methods inherited from class org.jibx.schema.codegen.ASTBuilderBase |
---|
numberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteral |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MethodDeclaration m_method
Constructor Detail |
---|
public MethodBuilder(ClassBuilder source, MethodDeclaration method)
source
- method
- Method Detail |
---|
public MethodDeclaration getDeclaration()
public SingleVariableDeclaration addParameter(java.lang.String name, Type type)
name
- type
-
public SingleVariableDeclaration addParameter(java.lang.String name, java.lang.String type)
name
- type
- fully-qualfied type name, or primitive name, with optional array suffixes
public void addThrows(java.lang.String type)
type
- exception typepublic BlockBuilder createBlock()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |