public abstract class BaseDefinitionNode extends TreeNode implements IDocumentableDefinitionNode, IDefinitionNode
Modifier and Type | Field and Description |
---|---|
protected IDefinition |
definition |
protected ExpressionNodeBase |
nameNode
The name of the definition
|
emptyNodeArray, parent
UNKNOWN
Constructor and Description |
---|
BaseDefinitionNode()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addDecorationChildren(boolean fillInOffsets) |
void |
addModifier(ModifierNode node) |
protected void |
analyze(EnumSet<PostProcessStep> set,
ASScope scope,
Collection<ICompilerProblem> problems) |
protected IDecorationPart |
createDecorationPart() |
protected void |
fillInMetadata(DefinitionBase definition) |
protected void |
fillInModifiers(DefinitionBase db) |
protected void |
fillInNamespaceAndModifiers(DefinitionBase db)
Helper method to fill in namespace, and modifier info for a definition.
|
IASDocComment |
getASDocComment()
Returns the raw
IASDocComment without any processing |
protected IDecorationPart |
getDecorationPart() |
DefinitionBase |
getDefinition() |
IMetaInfo[] |
getMetaInfos()
Get the
IMetaInfo s for all the metadat tags of this node. |
IMetaTagsNode |
getMetaTags()
Get the metadata tags of this node.
|
protected MetaTagsNode |
getMetaTagsNode() |
ModifiersSet |
getModifiers()
Get the modifiers of this variable.
|
ModifiersContainerNode |
getModifiersContainer() |
String |
getName()
Get the name of the type
|
int |
getNameAbsoluteEnd()
Get the absolute end offset of the name
|
int |
getNameAbsoluteStart()
Get the absolute start offset of the name
|
int |
getNameEnd()
Get the local end offset of the name
|
IExpressionNode |
getNameExpressionNode()
Gets the expression that represents the name of this
IDefinitionNode |
String |
getNamespace()
Returns the namespace that this member belongs to
|
INamespaceDecorationNode |
getNamespaceNode() |
int |
getNameStart()
Get the local start offset of the name
|
protected int |
getNodeStartForTooling()
returns the start of the first child node that is not ignored by the
tooling.
|
int |
getSpanningStart()
Gets the local offset where the node starts, including any extra items that may
change the appearance of the node's start.
|
boolean |
hasExplicitComment()
Determines if this node has an explicit comment.
|
boolean |
hasModifier(ASModifier modifier)
Is the given modifier present on this definition?
|
boolean |
hasNamespace(String namespace)
Is the given namespace present on this definition?
|
protected void |
init(ExpressionNodeBase nameNode) |
void |
normalize(boolean fillInOffsets)
Normalize the tree.
|
void |
setASDocComment(IASDocComment ref) |
protected void |
setDefinition(IDefinition definition) |
void |
setMetaTags(MetaTagsNode tags)
Set the metadata tags of the item.
|
void |
setModifiersContainer(ModifiersContainerNode container) |
void |
setNamespace(INamespaceDecorationNode namespace) |
addChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, getInitialChildCount, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildren
buildInnerString, buildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getASScope, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getPackageName, getParent, getScopeNode, getStart, getSucceedingNode, getWorkspace, isTerminal, isTransparent, looselyContains, runPostProcess, setChildren, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, 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
getContainingFilePath, getPackageName, getQualifiedName, getShortName, isImplicit
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getParent, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
protected ExpressionNodeBase nameNode
protected IDefinition definition
public int getSpanningStart()
IASNode
getSpanningStart
in interface IASNode
getSpanningStart
in class NodeBase
protected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
public void normalize(boolean fillInOffsets)
NodeBase
public boolean hasExplicitComment()
IDocumentableDefinitionNode
hasExplicitComment
in interface IDocumentableDefinitionNode
public IMetaTagsNode getMetaTags()
IDefinitionNode
getMetaTags
in interface IDefinitionNode
IMetaTagsNode
or nullpublic IMetaInfo[] getMetaInfos()
IDefinitionNode
IMetaInfo
s for all the metadat tags of this node.getMetaInfos
in interface IDefinitionNode
IMetaInfo
s. Never null.public boolean hasNamespace(String namespace)
IDefinitionNode
hasNamespace
in interface IDefinitionNode
namespace
- the namespace to check forpublic String getNamespace()
IDefinitionNode
getNamespace
in interface IDefinitionNode
public boolean hasModifier(ASModifier modifier)
IDefinitionNode
ASModifier
for the list of modifiershasModifier
in interface IDefinitionNode
public IExpressionNode getNameExpressionNode()
IDefinitionNode
IDefinitionNode
getNameExpressionNode
in interface IDefinitionNode
IExpressionNode
that represents the name of this typepublic String getName()
IDefinitionNode
getName
in interface IDefinitionNode
public int getNameStart()
IDefinitionNode
getNameStart
in interface IDefinitionNode
public int getNameEnd()
IDefinitionNode
getNameEnd
in interface IDefinitionNode
public int getNameAbsoluteStart()
IDefinitionNode
getNameAbsoluteStart
in interface IDefinitionNode
public int getNameAbsoluteEnd()
IDefinitionNode
getNameAbsoluteEnd
in interface IDefinitionNode
public DefinitionBase getDefinition()
getDefinition
in interface IDefinitionNode
protected void init(ExpressionNodeBase nameNode)
protected IDecorationPart createDecorationPart()
protected IDecorationPart getDecorationPart()
public void setMetaTags(MetaTagsNode tags)
tags
- the current collection of IMetaTagNode
tagspublic void setNamespace(INamespaceDecorationNode namespace)
public INamespaceDecorationNode getNamespaceNode()
protected MetaTagsNode getMetaTagsNode()
public void addModifier(ModifierNode node)
public void setModifiersContainer(ModifiersContainerNode container)
public ModifiersSet getModifiers()
public ModifiersContainerNode getModifiersContainer()
protected int getNodeStartForTooling()
public void setASDocComment(IASDocComment ref)
public IASDocComment getASDocComment()
IASDocComment
without any processinggetASDocComment
in interface IDocumentableDefinitionNode
IASDocComment
or nullprotected void addDecorationChildren(boolean fillInOffsets)
protected void fillInNamespaceAndModifiers(DefinitionBase db)
db
- protected void fillInModifiers(DefinitionBase db)
protected void fillInMetadata(DefinitionBase definition)
protected void setDefinition(IDefinition definition)
Copyright © 2016 The Apache Software Foundation. All rights reserved.