Package org.jibx.schema.codegen
Class IfBuilder
- java.lang.Object
-
- org.jibx.schema.codegen.ASTBuilderBase
-
- org.jibx.schema.codegen.StatementBuilderBase
-
- org.jibx.schema.codegen.IfBuilder
-
public class IfBuilder extends StatementBuilderBase
If statement builder. This wraps the AST if representation with convenience methods and added control information.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private IfStatementm_ifMethod invocation.private BlockBuilderm_thenBlock"then" block of statement (automatically created).-
Fields inherited from class org.jibx.schema.codegen.StatementBuilderBase
m_source
-
Fields inherited from class org.jibx.schema.codegen.ASTBuilderBase
m_ast
-
-
Constructor Summary
Constructors Constructor Description IfBuilder(ClassBuilder source, Expression expr)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) StatementgetStatement()Get the statement.BlockBuildergetThen()Get the "then" conditional block.voidsetElse(StatementBuilderBase stmt)Set the "else" conditional statement.-
Methods inherited from class org.jibx.schema.codegen.ASTBuilderBase
numberLiteral, setFinal, setPrivate, setPrivateFinal, setPrivateStaticFinal, setPublic, setPublicStatic, setPublicStaticFinal, setStatic, stringLiteral
-
-
-
-
Field Detail
-
m_if
private final IfStatement m_if
Method invocation.
-
m_thenBlock
private BlockBuilder m_thenBlock
"then" block of statement (automatically created).
-
-
Constructor Detail
-
IfBuilder
public IfBuilder(ClassBuilder source, Expression expr)
Constructor.- Parameters:
source-expr- expression
-
-
Method Detail
-
getStatement
Statement getStatement()
Get the statement.- Specified by:
getStatementin classStatementBuilderBase- Returns:
- statement
-
getThen
public BlockBuilder getThen()
Get the "then" conditional block.- Returns:
- block
-
setElse
public void setElse(StatementBuilderBase stmt)
Set the "else" conditional statement.- Parameters:
stmt-
-
-