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
|
contentsNode
definition, nameNode
emptyNodeArray, parent
UNKNOWN
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, getScopedNode
addDecorationChildren, addModifier, fillInMetadata, fillInModifiers, fillInNamespaceAndModifiers, getASDocComment, getDecorationPart, getMetaInfos, getMetaTagsNode, getModifiers, getModifiersContainer, getNamespaceNode, getNodeStartForTooling, getSpanningStart, hasExplicitComment, init, normalize, setASDocComment, setDefinition, setMetaTags, setModifiersContainer, setNamespace
addChild, addChild, addChildInOrder, addChildPostNormalize, addTemporaryChild, getChild, getChildCount, optimizeChildren, removeAllChildren, removeChild, removeTemporaryChild, replaceChild, sortChildren, swapChildren
buildStringRecursive, 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, 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
getScopedNode
getContainingFilePath, getMetaInfos
contains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getParent, getSpanningStart, getSucceedingNode, isTerminal
getAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStart
protected int packageKeywordStart
protected ExpressionNodeBase packageNameNode
public PackageNode(ExpressionNodeBase packageNameNode, IASToken packageKeyword)
packageNameNode
- node holding this package namepublic ASTNodeID getNodeID()
IASNode
public String getPackageName()
IASNode
getPackageName
in interface IASNode
getPackageName
in interface IDefinitionNode
getPackageName
in class NodeBase
protected void setChildren(boolean fillInOffsets)
NodeBase
setChildren
in class NodeBase
protected void analyze(EnumSet<PostProcessStep> set, ASScope scope, Collection<ICompilerProblem> problems)
analyze
in class BaseDefinitionNode
protected boolean buildInnerString(StringBuilder sb)
NodeBase
buildOuterString()
.
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 NodeBase
protected int getInitialChildCount()
TreeNode
getInitialChildCount
in class TreeNode
protected IDecorationPart createDecorationPart()
createDecorationPart
in class BaseDefinitionNode
public IMetaTagsNode getMetaTags()
IDefinitionNode
getMetaTags
in interface IDefinitionNode
getMetaTags
in class BaseDefinitionNode
IMetaTagsNode
or nullpublic String getNamespace()
IDefinitionNode
getNamespace
in interface IDefinitionNode
getNamespace
in class BaseDefinitionNode
public boolean hasNamespace(String namespace)
IDefinitionNode
hasNamespace
in interface IDefinitionNode
hasNamespace
in class BaseDefinitionNode
namespace
- the namespace to check forpublic boolean hasModifier(ASModifier modifier)
IDefinitionNode
ASModifier
for the list of modifiershasModifier
in interface IDefinitionNode
hasModifier
in class BaseDefinitionNode
public ExpressionNodeBase getNameExpressionNode()
IDefinitionNode
IDefinitionNode
getNameExpressionNode
in interface IDefinitionNode
getNameExpressionNode
in class BaseDefinitionNode
IExpressionNode
that represents the name of this typepublic String getName()
IDefinitionNode
getName
in interface IDefinitionNode
getName
in class BaseDefinitionNode
public int getNameStart()
IDefinitionNode
getNameStart
in interface IDefinitionNode
getNameStart
in class BaseDefinitionNode
public int getNameEnd()
IDefinitionNode
getNameEnd
in interface IDefinitionNode
getNameEnd
in class BaseDefinitionNode
public int getNameAbsoluteStart()
IDefinitionNode
getNameAbsoluteStart
in interface IDefinitionNode
getNameAbsoluteStart
in class BaseDefinitionNode
public int getNameAbsoluteEnd()
IDefinitionNode
getNameAbsoluteEnd
in interface IDefinitionNode
getNameAbsoluteEnd
in class BaseDefinitionNode
public PackageDefinition getDefinition()
getDefinition
in interface IDefinitionNode
getDefinition
in class BaseDefinitionNode
public boolean isImplicit()
IDefinitionNode
this
, super
,
default constructors, and cast functions.isImplicit
in interface IDefinitionNode
public String getQualifiedName()
IDefinitionNode
getQualifiedName
in interface IDefinitionNode
public String getShortName()
IDefinitionNode
getShortName
in interface IDefinitionNode
public IPackageNode.PackageKind getPackageKind()
IPackageNode
getPackageKind
in interface IPackageNode
IPackageNode.PackageKind
public 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.