Class GlobalModuleDependenciesManager


  • public class GlobalModuleDependenciesManager
    extends Object
    This class helps extracting all dependencies of a given type for a given set of modules. E.g. we can give it a set of modules and ask, which modules are needed to compile the given set: new GlobalModuleDependenciesManager(startSet).getModules(Deptype.COMPILE) Note that if we have M modules and N dependencies, and want to know something about a set of S modules, this will work O(M+N) in the worst case, regardless of S
    • Method Detail

      • getOnlyReexportModules

        @Deprecated
        public Collection<SModule> getOnlyReexportModules()
        Deprecated.
        one usage does not justify method's existence
        Return only modules with 'reexport' mark in the dependents subtree
      • getModules

        @NotNull
        public Collection<SModule> getModules​(GlobalModuleDependenciesManager.Deptype depType)
        Return all modules of a given dependency type in scope of given

        RUNTIMES: If we need runtimes, this only adds additional edges to our graph. M -uses> L -runtime> R is equivalent to M -non-reexp> R in this case

        REEXPORT: If we need dependencies with respect to reexport flag, we should first collect all neighbours of the given nodes in graph, and then, considering the graph with "reexport" edges only, collect all nodes accessible from (start set+neighbours) in this graph If we don't respect reexport flag, we should collect all accessible nodes from the given set in a dependencies graph. The "neighbours scheme" works in this case, too.

        Parameters:
        depType - determines the type of dependencies we want to get
        Returns:
        all modules in scope of given