public interface INamespaceDefinition extends IDocumentableDefinition, IQualifiers
namespace declaration.
An INamespaceDefinitionINamespaceNode.
For example, the declaration
public namespace ns = "http://whatever";creates a namespace definition whose base name is
"ns",
whose namespace reference is to the public namespace,
and whose type reference is null.
A user-defined namespace definition is contained within a file scope, a package scope, a class scope, an interface scope, or a function scope; it does not contain a scope.
There are also builtin namespace definitions for public,
protected, private, and internal
namespaces.
NamespaceDefinition.getPublicNamespaceDefinition()
is the singleton IPublicNamespaceDefinition representing
the public namespace.
All files share the same public namespace.
NamespaceDefinition.createPrivateNamespaceDefinition()
returns an IPrivateNamespaceDefinition representing
the private namespace for a particular file.
Different files have different private namespaces.
NamespaceDefinition.createProtectedNamespaceDefinition()
returns an IProtectedNamespaceDefinition representing
the protected namespace for a particular file.
Different fiels have different protected namespaces.
NamespaceDefinition.createInternalNamespaceDefinition
returns an IInternalNamespaceDefinition representing
the internal naemspace for a particular package.
Different packages have different internal namespaces.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
INamespaceDefinition.IAnyNamespaceDefinition
Interface implemented by the any namespace definition.
|
static interface |
INamespaceDefinition.ICodeModelImplicitDefinitionNamespaceDefinition
Interface implemented by the code model implicit definition namespace
definition.
|
static interface |
INamespaceDefinition.IFilePrivateNamespaceDefinition
Interface implemented by all file private namespace definitions.
|
static interface |
INamespaceDefinition.IInterfaceNamespaceDefinition
Interface implemented by all interface namespace definitions.
|
static interface |
INamespaceDefinition.IInternalNamespaceDefinition
Interface implemented by all internal namespace definitions.
|
static interface |
INamespaceDefinition.ILanguageNamespaceDefinition
Interface implemented by all language namespace definitions.
|
static interface |
INamespaceDefinition.INamespaceWithPackageName
Interface implemented by all language namespace definitions associated
with a package.
|
static interface |
INamespaceDefinition.IPrivateNamespaceDefinition
Interface implemented by all private namespace definitions.
|
static interface |
INamespaceDefinition.IProtectedNamespaceDefinition
Interface implemented by all protected namespace definitions.
|
static interface |
INamespaceDefinition.IPublicNamespaceDefinition
Interface implemented by all public namespace definitions.
|
static interface |
INamespaceDefinition.IStaticProtectedNamespaceDefinition
Interface implemented by all static protected namespace definitions.
|
static class |
INamespaceDefinition.NamespaceClassification
Determines the type of namespace
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(INamespaceDefinition namespace) |
INamespaceDefinition.NamespaceClassification |
getNamespaceClassification()
Get the classification for this namespace (local, package level, etc,
etc)
|
INamespaceNode |
getNode()
Returns the
INamespaceNode from which this definition was
created, if the definition came from the AST for a source file. |
String |
getURI()
Returns the optional URI associated with this namespace
|
boolean |
isPublicOrInternalNamespace() |
getExplicitSourceComment, hasExplicitCommentgetAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBaseName, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getPackageName, getParent, getQualifiedName, 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, resolveTypegetFirst, getNamespaceCount, getNamespaceSetINamespaceDefinition.NamespaceClassification getNamespaceClassification()
String getURI()
INamespaceNode getNode()
INamespaceNode 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.
getNode in interface IDefinitionboolean equals(INamespaceDefinition namespace)
namespace - boolean isPublicOrInternalNamespace()
Copyright © 2016 The Apache Software Foundation. All rights reserved.