public interface IASScope
IASScope
represents a scope found within ActionScript.
Together with IDefinition
, it is the basis of the compiler's
symbol table.
Scopes keep track of the definitions defined within a section of source code
(and also any import
and use namespace
directives).
It is common for a definition contained within a scope to contain another scope, so scopes and definitions form a hierarchical structure.
Scopes exist at the level of projects, files, packages, classes, interfaces,
functions, catch
blocks, and with
blocks.
A file scope (which may contain package, class, interface, function,
catch
, and with
scopes) is the local symbol table
for resolving references in a compilation unit to definitions within that
same compilation unit.
A project scope, populated with any externally visible definitions from each file scope, is the global symbol table for resolving reference in a compilation unit to definitions in other compilation units.
Each IASScope
supports the following behavior:
Modifier and Type | Method and Description |
---|---|
Collection<IDefinition> |
getAllLocalDefinitions()
Gets all the definitions in this one scope.
|
Collection<IDefinitionSet> |
getAllLocalDefinitionSets()
Gets all the definition sets in this one scope.
|
Collection<String> |
getAllLocalNames()
Gets all the base names of definitions in this one scope.
|
IASScope |
getContainingScope()
Gets the scope that lexically contains this scope.
|
IScopedDefinition |
getDefinition()
Gets the scoped definition that produced this scope.
|
IDefinitionSet |
getLocalDefinitionSetByName(String baseName)
Gets the set of definitions in this one scope that have the specified base name.
|
IScopedNode |
getScopeNode()
Gets the scoped node corresponding to this scope.
|
IASScope getContainingScope()
IASScope
that contains this scope,
or null
if there is no such scope.IScopedDefinition getDefinition()
IScopedDefinition
that contains this scope.IScopedNode getScopeNode()
IScopedNode
corresponding to this scope.IDefinitionSet getLocalDefinitionSetByName(String baseName)
baseName
- A String specifying a base name.IDefinitionSet
containing definitions with that base name,
or null
if there are no such definitions.Collection<String> getAllLocalNames()
Collection<IDefinitionSet> getAllLocalDefinitionSets()
IDefinitionSet
objects.Collection<IDefinition> getAllLocalDefinitions()
IDefinition
objects.Copyright © 2016 The Apache Software Foundation. All rights reserved.