public class NoDefinitionScope extends ASScope
ASScopeBase.FilteredCollection<T>
EMPTY_USE_ARRAY, scopedNodeRef
allNamespacesSet, definitionStore
Constructor and Description |
---|
NoDefinitionScope(ASScope containingScope) |
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(IDefinition d)
Override addDefinition so that all defns get hoisted to the containing
scope Catch scopes will provide an alternate way to add the definition
for the catch parameter
|
protected void |
addDefinitionToThisScope(IDefinition d)
Add a definition to this scope, instead of hoisting the defn to the
containing scope. used by CatchScopes to add their parameter
|
void |
addImport(String target)
Add the import to the containing scope
|
void |
addNamespaceDirective(NamespaceDefinition.INamespaceDirective directive)
add the namespace directive to the containing scope
|
void |
addUseDirective(NamespaceDefinition.IUseNamespaceDirective useDirective)
Add the use directive to the containing scope
|
IScopedDefinition |
getContainingDefinition()
Get's the
ScopedDefinitionBase that contains this scope. |
ScopedDefinitionBase |
getDefinition()
Always returns null, these scopes don't have associated defns
|
String[] |
getImports()
Get the imports from the containing scope
|
Set<INamespaceDefinition> |
getNamespaceSet(ICompilerProject project)
Get the namespace set of the containing scope
|
protected boolean |
namespaceSetSameAsContainingScopeNamespaceSet() |
addDependencyOnBuiltinType, addImplicitOpenNamespaces, addLocalImportsToNamespaceSet, addNamespacesFromContainingScope, adjustNamespaceSetForSuper, canDelegateLookupToContainingScope, compact, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findProperty, findPropertyQualified, findPropertyQualified, findPropertyQualified, findPropertyQualified, getAllPropertiesForMemberAccess, getAllPropertiesForScopeChain, getContainingClass, getContainingScope, getContainingScopeExplicitImports, getContainingSourcePath, getExplicitImportQualifiers, getFileScope, getFirstNamespaceDirective, getNamespaceSetForName, getNamespaceSetForSuper, getPropertiesByNameForMemberAccess, getPropertyByNameForMemberAccess, getPropertyForMemberAccess, getPropertyForMemberAccess, getPropertyForScopeChain, getPropertyFromDef, getPropertyFromDef, getQualifiedPropertyFromDef, getQualifiedPropertyFromDef, getScopeNode, getUsedNamespaces, getWorkspace, hasAnyBindableDefinitions, isInWith, isPackageName, reconnectScopeNode, setAsContainingScopeOfAnonymousFunction, setContainingDefinition, setContainingScope, toStringHeader
addDefinitionToStore, getAllLocalDefinitions, getAllLocalDefinitionSets, getAllLocalNames, getAllLocalProperties, getLocalDefinitionSetByName, getLocalProperty, getLocalProperty, getLocalProperty, isContingentDefinitionNeeded, removeDefinition, removeDefinitionFromStore, toString, verify
public NoDefinitionScope(ASScope containingScope)
public void addNamespaceDirective(NamespaceDefinition.INamespaceDirective directive)
addNamespaceDirective
in class ASScope
public void addImport(String target)
public void addUseDirective(NamespaceDefinition.IUseNamespaceDirective useDirective)
addUseDirective
in class ASScope
public String[] getImports()
getImports
in class ASScope
public ScopedDefinitionBase getDefinition()
getDefinition
in interface IASScope
getDefinition
in class ASScope
IScopedDefinition
that contains this scope.protected boolean namespaceSetSameAsContainingScopeNamespaceSet()
namespaceSetSameAsContainingScopeNamespaceSet
in class ASScope
public Set<INamespaceDefinition> getNamespaceSet(ICompilerProject project)
getNamespaceSet
in class ASScope
project
- The compiler project.public void addDefinition(IDefinition d)
addDefinition
in class ASScopeBase
d
- the definition to addprotected void addDefinitionToThisScope(IDefinition d)
d
- the definition to addpublic IScopedDefinition 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 scopeCopyright © 2016 The Apache Software Foundation. All rights reserved.