public class PackageDefinition extends MemberedDefinition implements IPackageDefinition
An instance of this class can represent a top-level packages such as "flashx", an intermediate-level package such as "flashx.textLayout", or a leaf-level package such as "flashx.textLayout.elements".
After a package definition is in the symbol table, it should always be
accessed through the read-only IPackageDefinition interface.
IPackageDefinition.PackageKindFLAG_CAST_FUNCTION, FLAG_CONSTRUCTOR, FLAG_CONTINGENT, FLAG_DECLARED_IN_CONTROL_FLOW, FLAG_DEFAULT, FLAG_DEPRECATED, FLAG_DYNAMIC, FLAG_FINAL, FLAG_GENERATED_EMBED_CLASS, FLAG_HAS_INIT, FLAG_IMPLICIT, FLAG_NATIVE, FLAG_OVERRIDE, FLAG_REST, FLAG_STATIC, flags, nodeRef, singletonEmptyMetaTags| Constructor and Description |
|---|
PackageDefinition(String packageName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildInnerString(StringBuilder sb)
Used only for debugging, as part of
DefinitionBase.toString(). |
String |
getBaseName()
Gets the base (i.e., unqualified) name of this definition.
|
IPackageNode |
getNode()
Returns the
IDefinitionNode from which this definition was
created, if the definition came from the AST for a source file. |
IPackageDefinition.PackageKind |
getPackageKind()
Returns the kind of package that this node represents
|
String |
getQualifiedName()
Gets the fully-qualified name of this definition.
|
static String |
getQualifiedPackageNameFromNamespaceURI(String uri)
Given an MXML namespace URI, this method returns the corresponding
package name, or
null if the URI doesn't have the form of a
package URI. |
void |
setVirtual() |
protected String |
toStorageName(String name) |
getContainedScope, setContainedScope, verifyaddMetaTag, buildString, getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getArrayElementType, getBindableEventNames, getColumn, getContainingASScope, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDefinition, getDeprecationInfo, getEnd, getExplicitSourceComment, getFileScope, getFileSpecification, getInstanceType, getLine, getLocationString, getMaxSize, getMetaTagByName, getMetaTagsByName, getMName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNamespaceReferenceAsString, getNameStart, getPackageName, getParent, getPercentProxy, getSize, getSkinPart, getSourcePath, getStart, getStorageName, getTypeAsDisplayString, getTypeDependencyType, getTypeReference, hasCollapseWhiteSpace, hasExplicitComment, hasMetaTagByName, hasModifier, hasNamespace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isDynamic, isEmpty, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, matches, resolveNamespace, resolveType, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toString, unsetOverrideclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContainedScopegetExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getPackageName, getParent, getSourcePath, getStart, getTypeAsDisplayString, getTypeReference, hasMetaTagByName, hasModifier, hasNamespace, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isDynamic, isFinal, isGeneratedEmbedClass, isImplicit, isInProject, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isStatic, resolveNamespace, resolveTypepublic PackageDefinition(String packageName)
packageName - The fully-qualified name of the package,
such as "flash.display".public static String getQualifiedPackageNameFromNamespaceURI(String uri)
null if the URI doesn't have the form of a
package URI.
For example, the namespace attribute xmlns:my="*"
corrresponds to the package name "", the attribute
xmlns:fd="flash.display.*" corresponds to the package name
"flash.display", and the attribute
xmlns:s="library://ns.adobe.com/flex/spark" does not
correspond to any package.
uri - An MXML namespace URI.null.public IPackageDefinition.PackageKind getPackageKind()
IPackageDefinitiongetPackageKind in interface IPackageDefinitionIPackageDefinition.PackageKindpublic void setVirtual()
protected String toStorageName(String name)
toStorageName in class DefinitionBasepublic String getBaseName()
IDefinition
For example, the base name of the class definition
for the class flash.display.Sprite
is "Sprite".
getBaseName in interface IDefinitiongetBaseName in class DefinitionBasepublic String getQualifiedName()
IDefinition
For example, the fully-qualified name of the class definition
for the class flash.display.Sprite is
"flash.display.Sprite".
getQualifiedName in interface IDefinitiongetQualifiedName in class DefinitionBasepublic IPackageNode getNode()
IDefinitionIDefinitionNode from which this definition was
created, if the definition came from the AST for a source file.
This method may require the AST to be reloaded or regenerated and therefore may be slow.
More specific definition interfaces such as IClassDefinition
redeclare this method to return a more specific node interface such as
IClassNode.
getNode in interface IDefinitiongetNode in interface IPackageDefinitiongetNode in class DefinitionBaseprotected void buildInnerString(StringBuilder sb)
DefinitionBase.toString().buildInnerString in class DefinitionBaseCopyright © 2016 The Apache Software Foundation. All rights reserved.