Package org.eclipse.epsilon.eol.dom
Class IfStatement
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.dom.AbstractExecutableModuleElement
-
- org.eclipse.epsilon.eol.dom.Statement
-
- org.eclipse.epsilon.eol.dom.IfStatement
-
- All Implemented Interfaces:
ModuleElement
,IExecutableModuleElement
public class IfStatement extends Statement
-
-
Field Summary
Fields Modifier and Type Field Description protected Expression
conditionExpression
protected StatementBlock
elseStatementBlock
protected StatementBlock
thenStatementBlock
-
Constructor Summary
Constructors Constructor Description IfStatement()
IfStatement(Expression conditionExpression, StatementBlock thenStatementBlock, StatementBlock elseStatementBlock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(IEolVisitor visitor)
void
build(AST cst, IModule module)
Object
execute(IEolContext context)
Expression
getConditionExpression()
StatementBlock
getElseStatementBlock()
StatementBlock
getThenStatementBlock()
void
setConditionExpression(Expression conditionExpression)
void
setElseStatementBlock(StatementBlock elseStatementBlock)
void
setThenStatementBlock(StatementBlock thenStatementBlock)
-
Methods inherited from class org.eclipse.epsilon.eol.dom.Statement
toStatementBlock
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
-
-
-
Field Detail
-
conditionExpression
protected Expression conditionExpression
-
thenStatementBlock
protected StatementBlock thenStatementBlock
-
elseStatementBlock
protected StatementBlock elseStatementBlock
-
-
Constructor Detail
-
IfStatement
public IfStatement()
-
IfStatement
public IfStatement(Expression conditionExpression, StatementBlock thenStatementBlock, StatementBlock elseStatementBlock)
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classAbstractModuleElement
-
execute
public Object execute(IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getConditionExpression
public Expression getConditionExpression()
-
setConditionExpression
public void setConditionExpression(Expression conditionExpression)
-
getThenStatementBlock
public StatementBlock getThenStatementBlock()
-
setThenStatementBlock
public void setThenStatementBlock(StatementBlock thenStatementBlock)
-
getElseStatementBlock
public StatementBlock getElseStatementBlock()
-
setElseStatementBlock
public void setElseStatementBlock(StatementBlock elseStatementBlock)
-
accept
public void accept(IEolVisitor visitor)
-
-