public final class IfStatement extends Statement implements IIfStatement
if-statement if ( <expression> ) <statement> [ else <statement> ] [ unless ( <expression> ) ]
IGosuParser| Modifier and Type | Field and Description |
|---|---|
protected Statement |
_elseStatement |
protected Expression |
_except |
protected Expression |
_expression |
protected Statement |
_statement |
VOID_RETURN_VALUE_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE| Constructor and Description |
|---|
IfStatement() |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute() |
Statement |
getElseStatement() |
Expression |
getExcept()
Deprecated.
|
Expression |
getExpression() |
protected ITerminalStatement |
getLeastSignificantTerminalStatement_internal(boolean[] bAbsolute) |
Statement |
getStatement() |
boolean |
hasElseStatement() |
void |
setElseStatement(Statement elseStatement) |
void |
setExcept(Expression except)
Deprecated.
|
void |
setExpression(Expression expression) |
void |
setStatement(Statement statement) |
String |
toString()
Subclasses should return a String representing the parsed statement.
|
execute, getExcludedReturnTypeElements, getLeastSignificant, getLeastSignificantTerminalStatement, getReturnType, hasContent, isNoOp, setParentaddExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setSynthetic, shouldClearParseInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitexecute, getLeastSignificantTerminalStatement, hasContentaddExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getReturnType, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParentprotected Expression _expression
protected Statement _statement
protected Statement _elseStatement
protected Expression _except
public Expression getExpression()
getExpression in interface IIfStatementpublic void setExpression(Expression expression)
expression - The conditional expression.public Statement getStatement()
getStatement in interface IIfStatementpublic void setStatement(Statement statement)
statement - The statement to execute if the conditional expression
evaluates to true.public Statement getElseStatement()
getElseStatement in interface IIfStatementpublic boolean hasElseStatement()
hasElseStatement in interface IIfStatementpublic void setElseStatement(Statement elseStatement)
elseStatement - The else statement to execute if the conditional expression
evaluates to false.public Expression getExcept()
public void setExcept(Expression except)
public Object execute()
execute in interface IStatementexecute in class Statementprotected ITerminalStatement getLeastSignificantTerminalStatement_internal(boolean[] bAbsolute)
getLeastSignificantTerminalStatement_internal in class StatementCopyright © 2015. All rights reserved.