ASScopeBase.FilteredCollection<T>
EMPTY_USE_ARRAY, scopedNodeRef
allNamespacesSet, definitionStore
Constructor and Description |
---|
PackageScope(ASScope containingScope,
String packageName)
Constructor
|
PackageScope(ASScope containingScope,
String packageName,
ScopedBlockNode contentsNode)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addImplicitOpenNamespaces(CompilerProject compilerProject,
Set<INamespaceDefinition> result) |
protected void |
addNamespacesFromContainingScope(CompilerProject compilerProject,
Set<INamespaceDefinition> result)
Add the open namespaces from the containing scope to the namespace set passed in
Package scopes will only add the implicit namespaces from the file scope if this is a .as file
|
ScopedDefinitionBase |
getContainingDefinition()
Get's the
ScopedDefinitionBase that contains this scope. |
protected void |
getContainingScopeExplicitImports(CompilerProject project,
String name,
Set<INamespaceDefinition> nsSet)
Get the additional namespaces for a reference, if the name has been explicitly imported in
a containing scope.
|
INamespaceDefinition.ILanguageNamespaceDefinition |
getInternalNamespace()
Gets the
INamespaceReference that resolves to the internal
namespace for this IPackageDefinition . |
INamespaceDefinition.ILanguageNamespaceDefinition |
getPublicNamespace()
Gets the
INamespaceReference that resolves to the public
namespace for this PackageScope . |
addDependencyOnBuiltinType, addImport, addLocalImportsToNamespaceSet, addNamespaceDirective, addUseDirective, adjustNamespaceSetForSuper, canDelegateLookupToContainingScope, compact, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findPropertyQualified, findPropertyQualified, findPropertyQualified, findPropertyQualified, getAllPropertiesForMemberAccess, getAllPropertiesForScopeChain, getContainingClass, getContainingScope, getContainingSourcePath, getDefinition, getExplicitImportQualifiers, getFileScope, getFirstNamespaceDirective, getImports, getNamespaceSet, getNamespaceSetForName, getNamespaceSetForSuper, getPropertiesByNameForMemberAccess, getPropertyByNameForMemberAccess, getPropertyForMemberAccess, getPropertyForMemberAccess, getPropertyForScopeChain, getPropertyFromDef, getPropertyFromDef, getQualifiedPropertyFromDef, getQualifiedPropertyFromDef, getScopeNode, getUsedNamespaces, getWorkspace, hasAnyBindableDefinitions, isInWith, isPackageName, namespaceSetSameAsContainingScopeNamespaceSet, reconnectScopeNode, setAsContainingScopeOfAnonymousFunction, setContainingDefinition, setContainingScope, toStringHeader
addDefinition, addDefinitionToStore, getAllLocalDefinitions, getAllLocalDefinitionSets, getAllLocalNames, getAllLocalProperties, getLocalDefinitionSetByName, getLocalProperty, getLocalProperty, getLocalProperty, isContingentDefinitionNeeded, removeDefinition, removeDefinitionFromStore, toString, verify
public PackageScope(ASScope containingScope, String packageName)
containingScope
- The ASScope
that contains the new package
scope. Usually an ASFileScope
.packageName
- Name of the package that the new package scope is for.public PackageScope(ASScope containingScope, String packageName, ScopedBlockNode contentsNode)
containingScope
- The ASScope
that contains the new package
scope. Usually an ASFileScope
.packageName
- Name of the package that the new package scope is for.contentsNode
- The ScopedBlockNode
that will contain all the
IASNode
's for the contents of the package.public INamespaceDefinition.ILanguageNamespaceDefinition getInternalNamespace()
INamespaceReference
that resolves to the internal
namespace for this IPackageDefinition
.INamespaceReference
that resolves to the internal
namespace for this IPackageDefinition
.public INamespaceDefinition.ILanguageNamespaceDefinition getPublicNamespace()
INamespaceReference
that resolves to the public
namespace for this PackageScope
.INamespaceReference
that resolves to the public
namespace for this PackageScope
.public void addImplicitOpenNamespaces(CompilerProject compilerProject, Set<INamespaceDefinition> result)
addImplicitOpenNamespaces
in class ASScope
public ScopedDefinitionBase getContainingDefinition()
ASScope
ScopedDefinitionBase
that contains this scope. This
method differs from ASScope.getDefinition()
in that this method will
walk up the scope chain.getContainingDefinition
in class ASScope
ScopedDefinitionBase
that contains this scopeprotected void addNamespacesFromContainingScope(CompilerProject compilerProject, Set<INamespaceDefinition> result)
addNamespacesFromContainingScope
in class ASScope
compilerProject
- the active projectresult
- the Namespace set to add the namespaces toprotected void getContainingScopeExplicitImports(CompilerProject project, String name, Set<INamespaceDefinition> nsSet)
getContainingScopeExplicitImports
in class ASScope
project
- the active projectname
- the name of the referencensSet
- the namespace set to add the namespaces toCopyright © 2016 The Apache Software Foundation. All rights reserved.