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
If statement builder. This wraps the AST if representation with convenience methods and added control information.
- Author:
- Dennis M. Sosnoski
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IfStatement
Method invocation.private BlockBuilder
"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 -
Method Summary
Modifier and TypeMethodDescription(package private) Statement
Get the statement.getThen()
Get the "then" conditional block.void
setElse
(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 Details
-
m_if
private final IfStatement m_ifMethod invocation. -
m_thenBlock
"then" block of statement (automatically created).
-
-
Constructor Details
-
IfBuilder
Constructor.- Parameters:
source
-expr
- expression
-
-
Method Details
-
getStatement
Statement getStatement()Get the statement.- Specified by:
getStatement
in classStatementBuilderBase
- Returns:
- statement
-
getThen
Get the "then" conditional block.- Returns:
- block
-
setElse
Set the "else" conditional statement.- Parameters:
stmt
-
-