public class TernaryOperatorNode extends BinaryOperatorNodeBase implements ITernaryOperatorNode
IOperatorNode.ExpressionType, IOperatorNode.OperatorTypeleftOperandNode, rightOperandNodeoperatorStartflagsemptyNodeArray, parentUNKNOWN| Modifier | Constructor and Description |
|---|---|
|
TernaryOperatorNode(IASToken op,
ExpressionNodeBase conditionalNode,
ExpressionNodeBase leftOperandNode,
ExpressionNodeBase rightOperandNode)
Create a ternary node from its components.
|
protected |
TernaryOperatorNode(TernaryOperatorNode other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected TernaryOperatorNode |
copy()
Copy the ExpressionNodeBase and its subtree.
|
IASNode |
getChild(int i)
Get a particular child of this node
|
int |
getChildCount()
Get the number of children
|
IExpressionNode |
getConditionalNode()
returns the conditional expression that determines branch for this
expression
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
IOperatorNode.OperatorType |
getOperator()
Returns the type of the operator that is referenced from this expression
|
ITypeDefinition |
resolveType(ICompilerProject project)
The type of the result of this expression.
|
protected void |
setChildren(boolean fillInOffsets)
If this node has custom children (names, arguments, etc), shove them into
the list of children.
|
create, fillInOffsets, getExpressionType, getLeftOperandNode, getRightOperandNode, isOperatingOnArray, resolveAssignmentType, resolveLogicalType, setLeftOperandNode, setRightOperandNodebuildInnerString, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart, getOperatorText, isTerminalcomputeNamespaceReference, copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getMName, getParentExpression, hasParenthesis, inFilter, inWith, isDynamicExpression, isPackageReference, normalize, resolve, setHasParenthesisanalyze, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getSpanningStart, getStart, getSucceedingNode, getWorkspace, isTransparent, looselyContains, replaceChild, runPostProcess, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, swapChildren, toString, tryGetOffsetLookup, verifygetColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, spanclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLeftOperandNode, getRightOperandNodecopyForInitializer, hasParenthesis, isDynamicExpression, resolvecontains, getAncestorOfType, getContainingNode, getContainingScope, getFileSpecification, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartgetOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStartpublic TernaryOperatorNode(IASToken op, ExpressionNodeBase conditionalNode, ExpressionNodeBase leftOperandNode, ExpressionNodeBase rightOperandNode)
op - Ternary operator ?.conditionalNode - Conditional expression.protected TernaryOperatorNode(TernaryOperatorNode other)
other - The node to copy.public ASTNodeID getNodeID()
IASNodepublic int getChildCount()
IASNodegetChildCount in interface IASNodegetChildCount in class BinaryOperatorNodeBasepublic IASNode getChild(int i)
IASNodegetChild in interface IASNodegetChild in class BinaryOperatorNodeBasei - the child's indexprotected void setChildren(boolean fillInOffsets)
NodeBasesetChildren in class BinaryOperatorNodeBasepublic ITypeDefinition resolveType(ICompilerProject project)
IExpressionNoderesolveType in interface IExpressionNoderesolveType in class BinaryOperatorNodeBaseproject - The ICompilerProject to use to do lookups.ITypeDefinition of the type this expression results in.protected TernaryOperatorNode copy()
ExpressionNodeBasecopy in class ExpressionNodeBasepublic IOperatorNode.OperatorType getOperator()
IOperatorNodegetOperator in interface IOperatorNodepublic IExpressionNode getConditionalNode()
ITernaryOperatorNodegetConditionalNode in interface ITernaryOperatorNodeIExpressionNode representing the conditionalCopyright © 2016 The Apache Software Foundation. All rights reserved.