Java.BlockStatement
, Java.Locatable
, Java.Scope
public static final class Java.IfStatement extends Java.Statement
Modifier and Type | Field | Description |
---|---|---|
Java.Rvalue |
condition |
The condition of the IF statement.
|
Java.BlockStatement |
optionalElseStatement |
The optional ELSE statement, which is executed iff the condition evaluates to FALSE.
|
Java.BlockStatement |
thenStatement |
The 'then statement', which is executed iff the condition evaluates to TRUE.
|
NOWHERE
localVariables
Constructor | Description |
---|---|
IfStatement(Location location,
Java.Rvalue condition,
Java.BlockStatement thenStatement,
Java.BlockStatement optionalElseStatement) |
Notice that the
elseStatement is mandatory; for an if statement without
an "else" clause, a dummy Java.EmptyStatement should be passed. |
Modifier and Type | Method | Description |
---|---|---|
void |
accept(Visitor.BlockStatementVisitor visitor) |
Invokes the '
visit...() ' method of Visitor.BlockStatementVisitor for the concrete
Java.BlockStatement type. |
String |
toString() |
getLocation, throwCompileException
getLocation, throwCompileException
findLocalVariable, getEnclosingScope, setEnclosingScope
public final Java.Rvalue condition
public final Java.BlockStatement thenStatement
public final Java.BlockStatement optionalElseStatement
public IfStatement(Location location, Java.Rvalue condition, Java.BlockStatement thenStatement, Java.BlockStatement optionalElseStatement)
elseStatement
is mandatory; for an if statement without
an "else" clause, a dummy Java.EmptyStatement
should be passed.public void accept(Visitor.BlockStatementVisitor visitor)
Java.BlockStatement
visit...()
' method of Visitor.BlockStatementVisitor
for the concrete
Java.BlockStatement
type.Copyright © 2001–2019. All rights reserved.