polyglot.ast
Interface If

All Superinterfaces:
java.lang.Cloneable, CompoundStmt, Copy, JL, Node, NodeOps, Stmt, Term
All Known Implementing Classes:
If_c

public interface If
extends CompoundStmt

An immutable representation of a Java language if statement. Contains an expression whose value is tested, a "then" statement (consequent), and optionally an "else" statement (alternate).


Method Summary
 Stmt alternative()
          Get the if's else clause, or null.
 If alternative(Stmt alternative)
          Set the if's else clause.
 Expr cond()
          Get the if's condition.
 If cond(Expr cond)
          Set the if's condition.
 Stmt consequent()
          Get the if's then clause.
 If consequent(Stmt consequent)
          Set the if's then clause.
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 
Methods inherited from interface polyglot.ast.Node
childExpectedType, del, del, dump, ext, ext, ext, ext, position, position, visit, visitChild, visitEdge, visitList
 
Methods inherited from interface polyglot.ast.JL
init, node
 
Methods inherited from interface polyglot.ast.NodeOps
addDecls, addMembers, addMembersEnter, buildTypes, buildTypesEnter, disambiguate, disambiguateEnter, enterScope, enterScope, exceptionCheck, exceptionCheckEnter, prettyPrint, throwTypes, translate, typeCheck, typeCheckEnter, visitChildren
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

cond

Expr cond()
Get the if's condition.


cond

If cond(Expr cond)
Set the if's condition.


consequent

Stmt consequent()
Get the if's then clause.


consequent

If consequent(Stmt consequent)
Set the if's then clause.


alternative

Stmt alternative()
Get the if's else clause, or null.


alternative

If alternative(Stmt alternative)
Set the if's else clause.