public class LibraryDependencyGraph extends Object
Constructor and Description |
---|
LibraryDependencyGraph()
Create an empty library dependency graph.
|
Modifier and Type | Method and Description |
---|---|
void |
addDependency(String depender,
String dependee,
Map<String,DependencyTypeSet> dependencies)
Adds a dependency to the dependency graph.
|
void |
addLibrary(String library)
Add a
ICompilationUnit to the dependency graph. |
boolean |
contains(String library) |
Set<String> |
getDependencies(String libraryPath)
Get the set of all libraries a given library is dependent on.
|
List<String> |
getDependencyOrder() |
Map<String,DependencyTypeSet> |
getDependencySet(String from,
String to)
Finds the named dependencies between two compilation units.
|
DependencyTypeSet |
getDependencyTypes(String from,
String to)
Finds the dependencies between two compilation units.
|
public LibraryDependencyGraph()
public void addDependency(String depender, String dependee, Map<String,DependencyTypeSet> dependencies)
depender
- The absolute path name of the library containing a
reference to a definition defined by the other library.dependee
- The absolute path name of the library with a definition referred to by
the other library.public void addLibrary(String library)
ICompilationUnit
to the dependency graph.public boolean contains(String library)
library
- An ICompilationUnit
to be checkedICompilationUnit
unit exists in this DependencyGraph
public Map<String,DependencyTypeSet> getDependencySet(String from, String to)
from
- The depender ICompilationUnit
to
- The dependee ICompilationUnit
Map
from definition
qname to a DependencyTypeSet
, representing the
dependencies between two ICompilationUnit
s.public DependencyTypeSet getDependencyTypes(String from, String to)
from
- The depender ICompilationUnit
to
- The dependee ICompilationUnit
DependencyTypeSet
that is active
between the two compilation unitspublic List<String> getDependencyOrder() throws LibraryCircularDependencyException
public Set<String> getDependencies(String libraryPath)
libraryPath
- The absolute path of a librarylibraryPath
depends on.
Each String
in the set is the absolute path of a library.Copyright © 2016 The Apache Software Foundation. All rights reserved.