public class PackageNode extends MemberedNode implements IPackageNode
IPackageNode.PackageKind| Modifier and Type | Field and Description |
|---|---|
protected int |
packageKeywordStart
Start offset for the package keyword
|
protected ExpressionNodeBase |
packageNameNode
The name of this package
|
contentsNodedefinition, nameNodeemptyNodeArray, parentUNKNOWN| Constructor and Description |
|---|
PackageNode(ExpressionNodeBase packageNameNode,
IASToken packageKeyword)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
analyze(EnumSet<PostProcessStep> set,
ASScope scope,
Collection<ICompilerProblem> problems) |
protected boolean |
buildInnerString(StringBuilder sb)
For debugging only.
|
protected IDecorationPart |
createDecorationPart() |
PackageDefinition |
getDefinition() |
protected int |
getInitialChildCount()
Take a guess as to an efficient initial child count.
|
IMetaTagsNode |
getMetaTags()
Get the metadata tags of this node.
|
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
|
ExpressionNodeBase |
getNameExpressionNode()
Gets the expression that represents the name of this
IDefinitionNode |
String |
getNamespace()
Returns the namespace that this member belongs to
|
int |
getNameStart()
Get the local start offset of the name
|
ASTNodeID |
getNodeID()
Get the opcode of this node
|
int |
getPackageKeywordEnd()
Get the end offset for the package keyword
|
int |
getPackageKeywordStart()
Get the start offset for the package keyword
|
IPackageNode.PackageKind |
getPackageKind()
Returns the kind of package that this node represents
|
String |
getPackageName()
Get package name that applies to this node.
|
String |
getQualifiedName()
Get the qualified name of this type
|
String |
getShortName()
Get the short name of this type (without any package information)
|
boolean |
hasModifier(ASModifier modifier)
Is the given modifier present on this definition?
|
boolean |
hasNamespace(String namespace)
Is the given namespace present on this definition?
|
boolean |
hasPackageKeyword()
Determine whether or not this node has a package keyword
|
boolean |
isImplicit()
Is this definition an implicit definition that doesn't actually appear in
the source file?
|
protected void |
setChildren(boolean fillInOffsets)
If this node has custom children (names, arguments, etc), shove them into
the list of children.
|
void |
setPackageName(ExpressionNodeBase packageNameNode)
Sets the name of this package.
|
getAllMemberDefinitionNodes, getScopedNodeaddDecorationChildren, addModifier, fillInMetadata, fillInModifiers, fillInNamespaceAndModifiers, getASDocComment, getDecorationPart, getMetaInfos, getMetaTagsNode, getModifiers, getModifiersContainer, getNamespaceNode, getNodeStartForTooling, getSpanningStart, hasExplicitComment, init, normalize, setASDocComment, setDefinition, setMetaTags, setModifiersContainer, setNamespaceaddChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildrenbuildStringRecursive, canContinueContainmentSearch, collectImportNodes, combineAttributes, connectedToProjectScope, contains, endAfter, endAfter, endBefore, endBefore, fillInOffsets, getAbsoluteEnd, getAbsoluteStart, getAncestorOfType, getASScope, getContainingFilePath, getContainingNode, getContainingScope, getEnd, getFileScope, getFileSpecification, getInnerString, getNodeKind, getParent, getScopeNode, getStart, getSucceedingNode, getWorkspace, isTerminal, isTransparent, looselyContains, runPostProcess, setParent, span, span, span, startAfter, startAfter, startBefore, startBefore, 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, waitgetScopedNodegetContainingFilePath, getMetaInfoscontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartprotected int packageKeywordStart
protected ExpressionNodeBase packageNameNode
public PackageNode(ExpressionNodeBase packageNameNode, IASToken packageKeyword)
packageNameNode - node holding this package namepublic ASTNodeID getNodeID()
IASNodepublic String getPackageName()
IASNodegetPackageName in interface IASNodegetPackageName in interface IDefinitionNodegetPackageName in class NodeBaseprotected void setChildren(boolean fillInOffsets)
NodeBasesetChildren in class NodeBaseprotected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
analyze in class BaseDefinitionNodeprotected boolean buildInnerString(StringBuilder sb)
NodeBasebuildOuterString().
It is overridden by subclasses to display optional node-specific
information in the middle of the string, between the node type and the
location information.buildInnerString in class NodeBaseprotected int getInitialChildCount()
TreeNodegetInitialChildCount in class TreeNodeprotected IDecorationPart createDecorationPart()
createDecorationPart in class BaseDefinitionNodepublic IMetaTagsNode getMetaTags()
IDefinitionNodegetMetaTags in interface IDefinitionNodegetMetaTags in class BaseDefinitionNodeIMetaTagsNode or nullpublic String getNamespace()
IDefinitionNodegetNamespace in interface IDefinitionNodegetNamespace in class BaseDefinitionNodepublic boolean hasNamespace(String namespace)
IDefinitionNodehasNamespace in interface IDefinitionNodehasNamespace in class BaseDefinitionNodenamespace - the namespace to check forpublic boolean hasModifier(ASModifier modifier)
IDefinitionNodeASModifier
for the list of modifiershasModifier in interface IDefinitionNodehasModifier in class BaseDefinitionNodepublic ExpressionNodeBase getNameExpressionNode()
IDefinitionNodeIDefinitionNodegetNameExpressionNode in interface IDefinitionNodegetNameExpressionNode in class BaseDefinitionNodeIExpressionNode that represents the name of this typepublic String getName()
IDefinitionNodegetName in interface IDefinitionNodegetName in class BaseDefinitionNodepublic int getNameStart()
IDefinitionNodegetNameStart in interface IDefinitionNodegetNameStart in class BaseDefinitionNodepublic int getNameEnd()
IDefinitionNodegetNameEnd in interface IDefinitionNodegetNameEnd in class BaseDefinitionNodepublic int getNameAbsoluteStart()
IDefinitionNodegetNameAbsoluteStart in interface IDefinitionNodegetNameAbsoluteStart in class BaseDefinitionNodepublic int getNameAbsoluteEnd()
IDefinitionNodegetNameAbsoluteEnd in interface IDefinitionNodegetNameAbsoluteEnd in class BaseDefinitionNodepublic PackageDefinition getDefinition()
getDefinition in interface IDefinitionNodegetDefinition in class BaseDefinitionNodepublic boolean isImplicit()
IDefinitionNodethis, super,
default constructors, and cast functions.isImplicit in interface IDefinitionNodepublic String getQualifiedName()
IDefinitionNodegetQualifiedName in interface IDefinitionNodepublic String getShortName()
IDefinitionNodegetShortName in interface IDefinitionNodepublic IPackageNode.PackageKind getPackageKind()
IPackageNodegetPackageKind in interface IPackageNodeIPackageNode.PackageKindpublic void setPackageName(ExpressionNodeBase packageNameNode)
packageNameNode - the name of the packagepublic boolean hasPackageKeyword()
public int getPackageKeywordStart()
public int getPackageKeywordEnd()
Copyright © 2016 The Apache Software Foundation. All rights reserved.