polyglot.ast
Interface Conditional

All Superinterfaces:
java.lang.Cloneable, Copy, Expr, JL, Node, NodeOps, Prefix, Receiver, Term, Typed
All Known Implementing Classes:
Conditional_c

public interface Conditional
extends Expr

A Conditional is a representation of a Java ternary expression. That is, (cond ? consequent : alternative).


Method Summary
 Expr alternative()
          Get the expression to evaluate when the condition is false.
 Conditional alternative(Expr alternative)
          Set the expression to evaluate when the condition is false.
 Expr cond()
          Get the condition to test.
 Conditional cond(Expr cond)
          Set the condition to test.
 Expr consequent()
          Get the expression to evaluate when the condition is true.
 Conditional consequent(Expr consequent)
          Set the expression to evaluate when the condition is true.
 
Methods inherited from interface polyglot.ast.Expr
constantValue, isConstant, precedence, printSubExpr, printSubExpr, type
 
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
 
Methods inherited from interface polyglot.ast.Typed
type
 
Methods inherited from interface polyglot.ast.Term
acceptCFG, entry, exceptions, exceptions, reachable, reachable
 

Method Detail

cond

Expr cond()
Get the condition to test.


cond

Conditional cond(Expr cond)
Set the condition to test.


consequent

Expr consequent()
Get the expression to evaluate when the condition is true.


consequent

Conditional consequent(Expr consequent)
Set the expression to evaluate when the condition is true.


alternative

Expr alternative()
Get the expression to evaluate when the condition is false.


alternative

Conditional alternative(Expr alternative)
Set the expression to evaluate when the condition is false.