Package org.jibx.schema.codegen
Class BodyBuilderBase
java.lang.Object
org.jibx.schema.codegen.ASTBuilderBase
org.jibx.schema.codegen.BodyBuilderBase
- Direct Known Subclasses:
FieldBuilder
,MethodBuilder
Abstract syntax tree body declaration builder base. This adds convenience methods and control information to the base
builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BodyDeclaration
Body declaration under construction.protected final ClassBuilder
Source builder.Fields inherited from class org.jibx.schema.codegen.ASTBuilderBase
m_ast
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSourceComment
(String text) Add untagged source comment for this body.void
addSourceComment
(String name, String text) Add optionally tagged source comment for this body.void
setFinal()
Set the final flag.void
Set the private access flag.void
Set private final flags.void
Set private static final flags.void
Set the public access flag.void
Set public static flags.void
Set public static final flags.void
Set the static flag.Methods inherited from class org.jibx.schema.codegen.ASTBuilderBase
numberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteral
-
Field Details
-
m_source
Source builder. -
m_declaration
protected final BodyDeclaration m_declarationBody declaration under construction.
-
-
Constructor Details
-
BodyBuilderBase
Constructor.- Parameters:
source
-decl
-
-
-
Method Details
-
setPublic
public void setPublic()Set the public access flag. -
setPrivate
public void setPrivate()Set the private access flag. -
setStatic
public void setStatic()Set the static flag. -
setFinal
public void setFinal()Set the final flag. -
setPrivateFinal
public void setPrivateFinal()Set private final flags. -
setPrivateStaticFinal
public void setPrivateStaticFinal()Set private static final flags. -
setPublicStatic
public void setPublicStatic()Set public static flags. -
setPublicStaticFinal
public void setPublicStaticFinal()Set public static final flags. -
addSourceComment
Add optionally tagged source comment for this body.- Parameters:
name
- tag name (add comment without tag ifnull
)text
- comment text,null
value ignored
-
addSourceComment
Add untagged source comment for this body.- Parameters:
text
- comment text,null
value ignored
-