public abstract class BinaryOperatorNodeBase extends OperatorNodeBase implements IBinaryOperatorNode
IOperatorNode.ExpressionType, IOperatorNode.OperatorType| Modifier and Type | Field and Description |
|---|---|
protected ExpressionNodeBase |
leftOperandNode
The expression to the left of the operator
|
protected ExpressionNodeBase |
rightOperandNode
The expression to the right of the operator
|
operatorStartflagsemptyNodeArray, parentUNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
BinaryOperatorNodeBase(BinaryOperatorNodeBase other)
Copy constructor.
|
|
BinaryOperatorNodeBase(IASToken op,
ExpressionNodeBase left,
ExpressionNodeBase right)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static BinaryOperatorNodeBase |
create(IASToken operatorToken,
ExpressionNodeBase leftOperand,
ExpressionNodeBase rightOperand)
Factory method for various kinds of binary operator nodes.
|
protected void |
fillInOffsets()
If the start and end offsets haven't been set explicitly, fill them in
based on the offsets of the children.
|
IASNode |
getChild(int i)
Get a particular child of this node
|
int |
getChildCount()
Get the number of children
|
IOperatorNode.ExpressionType |
getExpressionType()
Returns the type of expression that is represented by this node
|
IExpressionNode |
getLeftOperandNode()
Get expression to the left of the operator
|
IExpressionNode |
getRightOperandNode()
Get expression to the right of the operator
|
boolean |
isOperatingOnArray() |
protected ITypeDefinition |
resolveAssignmentType(ICompilerProject project)
Utility method called by
resolveType(ICompilerProject)
in subclasses for assignment operators. |
protected ITypeDefinition |
resolveLogicalType(ICompilerProject project)
|
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.
|
void |
setLeftOperandNode(ExpressionNodeBase leftOperandNode)
Sets the left-hand side of the expression.
|
void |
setRightOperandNode(ExpressionNodeBase rightOperandNode)
Sets the right side of the expression
|
buildInnerString, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart, getOperatorText, isTerminalcomputeNamespaceReference, copy, 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, waitgetOperator, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStartcopyForInitializer, hasParenthesis, isDynamicExpression, resolvecontains, getAncestorOfType, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartprotected ExpressionNodeBase leftOperandNode
protected ExpressionNodeBase rightOperandNode
public BinaryOperatorNodeBase(IASToken op, ExpressionNodeBase left, ExpressionNodeBase right)
Creates a BinaryOperatorNode from an operator and both operands.
If either operand is null, we will synthesize
empty IdentifierNode to repair the tree.
op - operator tokenleft - first operandright - second operandprotected BinaryOperatorNodeBase(BinaryOperatorNodeBase other)
other - The node to copy.public static BinaryOperatorNodeBase create(IASToken operatorToken, ExpressionNodeBase leftOperand, ExpressionNodeBase rightOperand)
public int getChildCount()
IASNodegetChildCount in interface IASNodegetChildCount in class NodeBasepublic IASNode getChild(int i)
IASNodeprotected void setChildren(boolean fillInOffsets)
NodeBasesetChildren in class NodeBaseprotected void fillInOffsets()
NodeBasefillInOffsets in class NodeBasepublic ITypeDefinition resolveType(ICompilerProject project)
IExpressionNoderesolveType in interface IExpressionNoderesolveType in class ExpressionNodeBaseproject - The ICompilerProject to use to do lookups.ITypeDefinition of the type this expression results in.public IOperatorNode.ExpressionType getExpressionType()
IOperatorNodegetExpressionType in interface IOperatorNodepublic IExpressionNode getLeftOperandNode()
IBinaryOperatorNodegetLeftOperandNode in interface IBinaryOperatorNodepublic IExpressionNode getRightOperandNode()
IBinaryOperatorNodegetRightOperandNode in interface IBinaryOperatorNodepublic void setLeftOperandNode(ExpressionNodeBase leftOperandNode)
leftOperandNode - Left-hand side expression.public void setRightOperandNode(ExpressionNodeBase rightOperandNode)
rightOperandNode - ExpressionNodeBase to the right of the operatorpublic boolean isOperatingOnArray()
protected ITypeDefinition resolveAssignmentType(ICompilerProject project)
resolveType(ICompilerProject)
in subclasses for assignment operators.protected ITypeDefinition resolveLogicalType(ICompilerProject project)
Copyright © 2016 The Apache Software Foundation. All rights reserved.