public abstract class UnaryOperatorNodeBase extends OperatorNodeBase implements IUnaryOperatorNode
IOperatorNode.ExpressionType, IOperatorNode.OperatorType
operatorStart
flags
emptyNodeArray, parent
UNKNOWN
Modifier | Constructor and Description |
---|---|
|
UnaryOperatorNodeBase(IASToken operatorToken,
ExpressionNodeBase operandNode)
Constructor.
|
protected |
UnaryOperatorNodeBase(UnaryOperatorNodeBase other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
static UnaryOperatorNodeBase |
createPostfix(IASToken operatorToken,
ExpressionNodeBase operand)
Factory method for various kinds of unary prefix operator nodes.
|
static UnaryOperatorNodeBase |
createPrefix(IASToken operatorToken,
ExpressionNodeBase operand)
Factory method for various kinds of unary prefix 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 |
getOperandNode()
Get expression acted on by the unary operator
|
boolean |
isDynamicExpression(ICompilerProject project)
Does this expression evaluate to a dynamic value
|
protected ITypeDefinition |
resolveIncrementOrDecrementType(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 |
setExpression(ExpressionNodeBase operandNode) |
buildInnerString, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart, getOperatorText, isTerminal
computeNamespaceReference, copy, copyForInitializer, getASScope, getBaseExpression, getDecorationNode, getDependencyType, getMName, getParentExpression, hasParenthesis, inFilter, inWith, isPackageReference, normalize, resolve, setHasParenthesis
analyze, 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, verify
getColumn, getEndColumn, getEndLine, getLine, getLineColumnString, getOffsetsString, getSourcePath, getSourcePathString, setColumn, setEnd, setEndColumn, setEndLine, setLine, setSourceLocation, setSourcePath, setStart, span, span
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getOperator, getOperatorAbsoluteEnd, getOperatorAbsoluteStart, getOperatorEnd, getOperatorStart
copyForInitializer, hasParenthesis, resolve
contains, getAncestorOfType, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
public UnaryOperatorNodeBase(IASToken operatorToken, ExpressionNodeBase operandNode)
operatorToken
- The token representing the unary operator.operandNode
- The expresson node representing the operand.protected UnaryOperatorNodeBase(UnaryOperatorNodeBase other)
other
- The node to copy.public static UnaryOperatorNodeBase createPrefix(IASToken operatorToken, ExpressionNodeBase operand)
public static UnaryOperatorNodeBase createPostfix(IASToken operatorToken, ExpressionNodeBase operand)
public int getChildCount()
IASNode
getChildCount
in interface IASNode
getChildCount
in class NodeBase
public IASNode getChild(int i)
IASNode
protected void setChildren(boolean fillInOffsets)
NodeBase
setChildren
in class NodeBase
protected void fillInOffsets()
NodeBase
fillInOffsets
in class NodeBase
public ITypeDefinition resolveType(ICompilerProject project)
IExpressionNode
resolveType
in interface IExpressionNode
resolveType
in class ExpressionNodeBase
project
- The ICompilerProject
to use to do lookups.ITypeDefinition
of the type this expression results in.public boolean isDynamicExpression(ICompilerProject project)
IExpressionNode
isDynamicExpression
in interface IExpressionNode
isDynamicExpression
in class ExpressionNodeBase
project
- The ICompilerProject
to use to do lookups.true
if we evaluate to something dynamicpublic IOperatorNode.ExpressionType getExpressionType()
IOperatorNode
getExpressionType
in interface IOperatorNode
public IExpressionNode getOperandNode()
IUnaryOperatorNode
getOperandNode
in interface IUnaryOperatorNode
IExpressionNode
public void setExpression(ExpressionNodeBase operandNode)
protected ITypeDefinition resolveIncrementOrDecrementType(ICompilerProject project)
Copyright © 2016 The Apache Software Foundation. All rights reserved.