public interface IDependencies
IConfig.getPaths()
and
IConfig.getPackageLocations()
. The dependencies of a module are those
modules listed in the require list of the define() function call within the
module. The expanded dependencies for a module include the explicitly
declared dependencies, plus all of the nested dependencies obtained by
including the dependencies of the explicitly dependent modules, plus their
dependencies, and so on.Modifier and Type | Field and Description |
---|---|
static String[] |
defaultNonJSExtensions
Default non-JavaScript file extensions to include in the scanned dependencies names list returned
by
getDependencyNames() . |
static Collection<String> |
excludes
Module names to be excluded when expanding.
|
static String |
nonJSExtensionsCfgPropName
Name of config property specifying optional additional file extension names to include in the
scanned dependencies name list returned by
getDependencyNames() . |
Modifier and Type | Method and Description |
---|---|
List<String> |
getDelcaredDependencies(String mid)
Returns the dependencies for the specified module.
|
Iterable<String> |
getDependencyNames()
Returns an
Iterable over the module names that were scanned while building the
dependency map. |
List<String> |
getDependentFeatures(String mid)
Returns the list of dependent features for the specified module.
|
long |
getLastModified()
Returns the cumulative last-modified date of these dependencies which was
determined the last time the dependencies were created or validated.
|
List<String> |
getRequireDependencies(String mid)
Returns the list of modules specified in the dependency lists of any require calls contained
within the specified module.
|
URI |
getURI(String mid)
Returns the resource URI for the specified module id.
|
void |
validateDeps(boolean clean)
Validates the dependency graph by scanning the directories returned by
IConfig.getPaths() and IConfig.getPackageLocations()
looking for new/changed/removed files and updating the dependency graph,
including the dependency graph last-modified timestamp, as needed. |
static final Collection<String> excludes
static final String[] defaultNonJSExtensions
getDependencyNames()
.static final String nonJSExtensionsCfgPropName
getDependencyNames()
.List<String> getDelcaredDependencies(String mid) throws ProcessingDependenciesException
mid
- The module idProcessingDependenciesException
List<String> getRequireDependencies(String mid) throws ProcessingDependenciesException
Note that no attempt is made to determine if the require call will ever be executed by the client by looking for dead code, etc. Any require calls that appear within the module will be used in collecting require dependencies.
mid
- The module idProcessingDependenciesException
List<String> getDependentFeatures(String mid) throws ProcessingDependenciesException
Note that not all feature names used in has() function calls may be
returned in this list. Only features that are used in has() function
calls who's return value is used as a boolean are included (e.g.
if (has('isIE')) {
). If the result of the has function call
is used as another type, then the feature may not be be included in the
returned list (e.g. var isIE = has('isIE');
or
if (has('isIE') < 8) {
). This is because feature values are
specified in aggregator requests as booleans, so aggregator optimizations
based on defined features may not be safely performed if the result of a
feature evaluation is used as a type other than boolean.
mid
- the module idProcessingDependenciesException
URI getURI(String mid) throws ProcessingDependenciesException
getDependencyNames()
will return a non-null value. Any other value passed for
mid
will result in a return value of null.mid
- the module idProcessingDependenciesException
Iterable<String> getDependencyNames() throws ProcessingDependenciesException
Iterable
over the module names that were scanned while building the
dependency map. This includes JavaScript modules as well as selected non-JavaScript modules.
Non-JavaScript modules included in the result include the following:
defaultNonJSExtensions
nonJSExtensionsCfgPropName
IModuleBuilderExtensionPoint.EXTENSION_ATTRIBUTE
config property for the registered
module buildersgetDelcaredDependencies(String)
or getDependentFeatures(String)
,
an empty list will be returned.ProcessingDependenciesException
long getLastModified()
void validateDeps(boolean clean)
IConfig.getPaths()
and IConfig.getPackageLocations()
looking for new/changed/removed files and updating the dependency graph,
including the dependency graph last-modified timestamp, as needed.clean
- If true, then any cached or previously calculated dependency
graph is discarded and a new graph is generated from scratch.
Use this option if file or directory last-modified dates
cannot be relied upon to accurately reflect the changed state
of the module files included in the graph.Copyright © 2011-2015 IBM. All Rights Reserved.