if(a==5) hurray() else boo(); the condition is a==5,
hurray() is the thenStmt, and boo() is the elseStmt.
| Modifier and Type | Field and Description |
|---|---|
| private Expression | |
| private Statement | |
| private Statement |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | IfStmt(TokenRange tokenRange, Expression condition, Statement thenStmt, Statement elseStmt)
This constructor is used by the parser and is considered private. |
| Modifier and Type | Method and Description |
|---|---|
| public <R, A> R | accept(final GenericVisitor<R, A>
the visitor implementation v, final A the argument passed to the visitor (of type A) arg)Implements com. |
| public <A> void | accept(final VoidVisitor<A>
the visitor implementation v, final A any value relevant for the visitor (of type A) arg)Implements com. |
| public IfStmt | |
| public IfStmt | clone()
Creates and returns a copy of this object.
|
| public Expression | |
| public Optional | |
| public IfStmtMetaModel | |
| public Statement | |
| public boolean | hasCascadingIfStmt()
This method returns true if the If Statement has an else branch and that branch is another If Statement. |
| public boolean | hasElseBlock()
This method returns true if the If Statement has an else branch and that branch is a block statement. |
| public boolean | |
| public boolean | hasThenBlock()
This method returns true if the then branch (which should be always present) is a block statement. |
| public void | |
| public boolean | |
| public boolean | |
| public IfStmt | |
| public boolean | |
| public IfStmt | setCondition(final Expression condition)
Implements com. |
| public IfStmt | Returns: this, the IfStmtthe elseStmt, can be null elseStmt)Sets the elseStmt |
| public IfStmt | |
| public Optional |
| condition | back to summary |
|---|---|
| private Expression condition | |
| elseStmt | back to summary |
|---|---|
| private Statement elseStmt
| |
| thenStmt | back to summary |
|---|---|
| private Statement thenStmt | |
| IfStmt | back to summary |
|---|---|
| public IfStmt() | |
| IfStmt | back to summary |
|---|---|
public IfStmt(final Expression condition, final Statement thenStmt, final Statement elseStmt)
| |
| IfStmt | back to summary |
|---|---|
| public IfStmt(TokenRange tokenRange, Expression condition, Statement thenStmt, Statement elseStmt) This constructor is used by the parser and is considered private.
| |
| accept | back to summary |
|---|---|
| public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) Implements com. Doc from com. Accept method for visitor support.
| |
| accept | back to summary |
|---|---|
| public <A> void accept(final VoidVisitor<A> v, final A arg) Implements com. Doc from com. Accept method for visitor support.
| |
| asIfStmt | back to summary |
|---|---|
| public IfStmt asIfStmt() Overrides com.
| |
| clone | back to summary |
|---|---|
| public IfStmt clone() Overrides com. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getCondition | back to summary |
|---|---|
| public Expression getCondition() Implements com.
| |
| getElseStmt | back to summary |
|---|---|
public Optional
| |
| getMetaModel | back to summary |
|---|---|
| public IfStmtMetaModel getMetaModel() Overrides com.
| |
| getThenStmt | back to summary |
|---|---|
public Statement getThenStmt()
| |
| hasCascadingIfStmt | back to summary |
|---|---|
| public boolean hasCascadingIfStmt() This method returns true if the If Statement has an else branch and that branch is another If Statement.
| |
| hasElseBlock | back to summary |
|---|---|
| public boolean hasElseBlock() This method returns true if the If Statement has an else branch and that branch is a block statement.
| |
| hasElseBranch | back to summary |
|---|---|
| public boolean hasElseBranch() This method returns true if the If Statement has an else branch.
| |
| hasThenBlock | back to summary |
|---|---|
| public boolean hasThenBlock() This method returns true if the then branch (which should be always present) is a block statement.
| |
| ifIfStmt | back to summary |
|---|---|
| public void ifIfStmt(Consumer<IfStmt> action) Overrides com.
| |
| isIfStmt | back to summary |
|---|---|
| public boolean isIfStmt() Overrides com.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Node node) Overrides com.
| |
| removeElseStmt | back to summary |
|---|---|
public IfStmt removeElseStmt()
| |
| replace | back to summary |
|---|---|
| public boolean replace(Node node, Node replacementNode) Overrides com.
| |
| setCondition | back to summary |
|---|---|
| public IfStmt setCondition(final Expression condition) Implements com.
| |
| setElseStmt | back to summary |
|---|---|
| public IfStmt setElseStmt(final Statement elseStmt) Sets the elseStmt
| |
| setThenStmt | back to summary |
|---|---|
public IfStmt setThenStmt(final Statement thenStmt)
| |
| toIfStmt | back to summary |
|---|---|
| public Optional Overrides com.
| |