com.adobe.flexbuilder.codemodel.definitions
Interface IASScope

All Known Subinterfaces:
IConnectedScope

public interface IASScope

Interface describing a scope. There is a scope for each {} block in a file (including function bodies, class bodies, and so on). There is also a file-level scope for each file in the project and a project-level scope that holds cross-file definitions. Scopes keep track of which definitions are available where. Scopes also are capable of determining if other scopes are connected through include statements


Field Summary
static IConnectedScope[] EMPTY_SCOPE
           
static java.util.Hashtable EMPTY_SYMBOL_TABLE
           
 
Method Summary
 void findAllDefinitions(ASDefinitionFilter filter, ASDefinitionCache cache, java.util.List definitions)
          Find all definitions that match the filter
 void findAllDefinitions(ASDefinitionFilter filter, ASDefinitionCache cache, java.util.List definitions, java.util.Set guard)
          Find all definitions that match the filter
 void findAllDefinitionsByName(java.lang.String name, ASDefinitionFilter filter, ASDefinitionCache cache, java.util.List definitions)
          Find all definitions that match the name and filter
 void findAllDefinitionsByName(java.lang.String name, ASDefinitionFilter filter, ASDefinitionCache cache, java.util.List definitions, java.util.Set guard)
          Find all definitions that match the name and filter
 IDefinition findDefinitionByName(java.lang.String name, ASDefinitionFilter filter, ASDefinitionCache cache)
          Find the first definition that matches the name and filter properties
 IDefinition findDefinitionByName(java.lang.String name, ASDefinitionFilter filter, ASDefinitionCache cache, java.util.Set guard)
          Find the first definition that matches the name and filter properties
 INamespace[] getAllNamespaces()
          Returns all the INamespaces that are available in scope
 IConnectedScope[] getConnectedScopes(java.util.Set guard)
          Returns all the scopes that are connected to this scope
 IASScope getContainingScope(java.util.Set guard, boolean ignoreTemporaryScope)
          Gets the IASScope that contains this scope
 IScopedNode getScopeNode()
           
 java.util.Hashtable getSymbols()
           
 

Field Detail

EMPTY_SCOPE

public static final IConnectedScope[] EMPTY_SCOPE

EMPTY_SYMBOL_TABLE

public static final java.util.Hashtable EMPTY_SYMBOL_TABLE
Method Detail

findDefinitionByName

public IDefinition findDefinitionByName(java.lang.String name,
                                        ASDefinitionFilter filter,
                                        ASDefinitionCache cache)
Find the first definition that matches the name and filter properties

Parameters:
name - symbol name being referenced
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
Returns:
the first definition matching the name and filter

findDefinitionByName

public IDefinition findDefinitionByName(java.lang.String name,
                                        ASDefinitionFilter filter,
                                        ASDefinitionCache cache,
                                        java.util.Set guard)
Find the first definition that matches the name and filter properties

Parameters:
name - symbol name being referenced
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
Returns:
the first definition matching the name and filter

findAllDefinitionsByName

public void findAllDefinitionsByName(java.lang.String name,
                                     ASDefinitionFilter filter,
                                     ASDefinitionCache cache,
                                     java.util.List definitions)
Find all definitions that match the name and filter

Parameters:
name - symbol name being referenced
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
definitions - list to populate with definitions matching the name and filter

findAllDefinitionsByName

public void findAllDefinitionsByName(java.lang.String name,
                                     ASDefinitionFilter filter,
                                     ASDefinitionCache cache,
                                     java.util.List definitions,
                                     java.util.Set guard)
Find all definitions that match the name and filter

Parameters:
name - symbol name being referenced
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
definitions - list to populate with definitions matching the name and filter

findAllDefinitions

public void findAllDefinitions(ASDefinitionFilter filter,
                               ASDefinitionCache cache,
                               java.util.List definitions)
Find all definitions that match the filter

Parameters:
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
definitions - list to populate with definitions matching the filter

findAllDefinitions

public void findAllDefinitions(ASDefinitionFilter filter,
                               ASDefinitionCache cache,
                               java.util.List definitions,
                               java.util.Set guard)
Find all definitions that match the filter

Parameters:
filter - search scope, classification, and static/non-static
cache - definition cache in which to look up already-found definitions
definitions - list to populate with definitions matching the filter

getConnectedScopes

public IConnectedScope[] getConnectedScopes(java.util.Set guard)
Returns all the scopes that are connected to this scope

Parameters:
guard - guard to prevent loops in our scope chain
Returns:
an array of IConnectedScope or an empty array

getAllNamespaces

public INamespace[] getAllNamespaces()
Returns all the INamespaces that are available in scope

Returns:
an INamespace array or an empty array

getContainingScope

public IASScope getContainingScope(java.util.Set guard,
                                   boolean ignoreTemporaryScope)
Gets the IASScope that contains this scope

Parameters:
guard - a recursion guard to protect against loops caused by includes
ignoreTemporaryScope - a temporary scope is one connected to us through an include. True if we want to treat this scope like it doesn't have one
Returns:
the containing scope of this scope

getSymbols

public java.util.Hashtable getSymbols()
Returns:
a collection of all the symbols contained in the scope. Name => IDefinition

getScopeNode

public IScopedNode getScopeNode()
Returns:
the IScopedNode corresponding to this scope