Class TernaryExpressionNode
java.lang.Object
org.checkerframework.dataflow.cfg.node.Node
org.checkerframework.dataflow.cfg.node.TernaryExpressionNode
- All Implemented Interfaces:
- org.plumelib.util.UniqueId
A node for a conditional expression:
 
expression ? expression : expression
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final NodeNode representing the condition checked by the expressionprotected final NodeNode representing the "else" case of the expressionprotected final NodeNode representing the "then" case of the expressionprotected final ConditionalExpressionTreeTheConditionalExpressionTreecorresponding to this node
- 
Constructor SummaryConstructorsConstructorDescriptionTernaryExpressionNode(ConditionalExpressionTree tree, Node condition, Node thenOperand, Node elseOperand, LocalVariableNode ternaryExpressionVar) Creates a new TernaryExpressionNode.
- 
Method SummaryModifier and TypeMethodDescription<R,P> R accept(NodeVisitor<R, P> visitor, P p) Accept method of the visitor pattern.booleanGets the node representing the conditional operand for this nodeGets the node representing the "else" operand for this nodeThis is a variable created by dataflow to which each case expression of the ternary expression is assigned.Gets the node representing the "then" operand for this nodegetTree()Returns theTreein the abstract syntax tree, ornullif no corresponding tree exists.inthashCode()toString()Methods inherited from class org.checkerframework.dataflow.cfg.node.NodegetBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebugMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueIdgetClassAndUid
- 
Field Details- 
treeTheConditionalExpressionTreecorresponding to this node
- 
conditionNode representing the condition checked by the expression
- 
thenOperandNode representing the "then" case of the expression
- 
elseOperandNode representing the "else" case of the expression
 
- 
- 
Constructor Details- 
TernaryExpressionNodepublic TernaryExpressionNode(ConditionalExpressionTree tree, Node condition, Node thenOperand, Node elseOperand, LocalVariableNode ternaryExpressionVar) Creates a new TernaryExpressionNode.- Parameters:
- tree- the- ConditionalExpressionTreefor the node
- condition- node representing the condition checked by the expression
- thenOperand- node representing the "then" case of the expression
- elseOperand- node representing the "else" case of the expression
- ternaryExpressionVar- a variable created by dataflow to which each case expression of the ternary expression is assigned. Its value should be used for the value of the switch expression.
 
 
- 
- 
Method Details- 
getConditionOperandGets the node representing the conditional operand for this node- Returns:
- the condition operand node
 
- 
getThenOperandGets the node representing the "then" operand for this node- Returns:
- the "then" operand node
 
- 
getElseOperandGets the node representing the "else" operand for this node- Returns:
- the "else" operand node
 
- 
getTernaryExpressionVarThis is a variable created by dataflow to which each case expression of the ternary expression is assigned. Its value should be used for the value of the switch expression.- Returns:
- the variable for this ternary expression
 
- 
getTreeDescription copied from class:NodeReturns theTreein the abstract syntax tree, ornullif no corresponding tree exists. For instance, this is the case for anImplicitThisNode.
- 
acceptDescription copied from class:NodeAccept method of the visitor pattern.
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
getOperandsDescription copied from class:Node- Specified by:
- getOperandsin class- Node
- Returns:
- a collection containing all of the operand Nodes of thisNode
 
 
-