public interface SortedDependencies<INPUT extends DependencyInfo>
Performs a sort to make sure that an input always comes after its dependencies.
Also exposes other information about the inputs, like which inputs do not provide symbols. TODO(tbreisacher): Consider removing this interface, since it now has only one class implementing it.
Modifier and Type | Interface and Description |
---|---|
static class |
SortedDependencies.MissingProvideException |
Modifier and Type | Method and Description |
---|---|
INPUT |
getInputProviding(java.lang.String symbol)
Return the input that gives us the given symbol.
|
java.util.List<INPUT> |
getInputsWithoutProvides() |
java.util.List<INPUT> |
getSortedList() |
java.util.List<INPUT> |
getSortedStrongDependenciesOf(java.util.List<INPUT> roots)
Gets all the strong dependencies of the given roots.
|
java.util.List<INPUT> |
getSortedWeakDependenciesOf(java.util.List<INPUT> roots)
Gets all the weak dependencies of the given roots.
|
java.util.List<INPUT> |
getStrongDependenciesOf(java.util.List<INPUT> roots,
boolean sorted)
Gets all the strong dependencies of the given roots.
|
INPUT |
maybeGetInputProviding(java.lang.String symbol)
Return the input that gives us the given symbol, or null.
|
INPUT getInputProviding(java.lang.String symbol) throws SortedDependencies.MissingProvideException
SortedDependencies.MissingProvideException
- An exception if there is no
input for this symbol.INPUT maybeGetInputProviding(java.lang.String symbol)
java.util.List<INPUT> getSortedList()
java.util.List<INPUT> getSortedStrongDependenciesOf(java.util.List<INPUT> roots)
java.util.List<INPUT> getSortedWeakDependenciesOf(java.util.List<INPUT> roots)
The weak dependencies are those that are only reachable via type requires from the roots. Note that if a root weakly requires another input, then all of its transitive dependencies (strong or weak) that are not strongly reachable from the roots will be included. e.g. if A weakly requires B, and B strongly requires C, and A is the sole root, then this will return B and C. However, if we add D as a root, and D strongly requires C, then this will only return B.
Root inputs will never be in the returned list as they are all considered strong.
java.util.List<INPUT> getStrongDependenciesOf(java.util.List<INPUT> roots, boolean sorted)
sorted
- If true, get them in topologically sorted order. If false, get them in the
original order they were passed to the compiler.java.util.List<INPUT> getInputsWithoutProvides()
Copyright © 2009-2019 Google. All Rights Reserved.