public final class ClosureSortedDependencies<INPUT extends DependencyInfo> extends Object implements SortedDependencies<INPUT>
Uses a stable topological 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.
SortedDependencies.CircularDependencyException, SortedDependencies.MissingProvideException| Constructor and Description |
|---|
ClosureSortedDependencies(List<INPUT> inputs) |
| Modifier and Type | Method and Description |
|---|---|
List<INPUT> |
getDependenciesOf(List<INPUT> roots,
boolean sorted)
Gets all the dependencies of the given roots.
|
INPUT |
getInputProviding(String symbol)
Return the input that gives us the given symbol.
|
List<INPUT> |
getInputsWithoutProvides() |
List<INPUT> |
getSortedDependenciesOf(List<INPUT> roots)
Gets all the dependencies of the given roots.
|
List<INPUT> |
getSortedList() |
INPUT |
maybeGetInputProviding(String symbol)
Return the input that gives us the given symbol, or null.
|
public ClosureSortedDependencies(List<INPUT> inputs) throws SortedDependencies.CircularDependencyException
public INPUT getInputProviding(String symbol) throws SortedDependencies.MissingProvideException
SortedDependenciesgetInputProviding in interface SortedDependencies<INPUT extends DependencyInfo>SortedDependencies.MissingProvideException - An exception if there is no
input for this symbol.public INPUT maybeGetInputProviding(String symbol)
SortedDependenciesmaybeGetInputProviding in interface SortedDependencies<INPUT extends DependencyInfo>public List<INPUT> getSortedList()
getSortedList in interface SortedDependencies<INPUT extends DependencyInfo>public List<INPUT> getSortedDependenciesOf(List<INPUT> roots)
getSortedDependenciesOf in interface SortedDependencies<INPUT extends DependencyInfo>public List<INPUT> getDependenciesOf(List<INPUT> roots, boolean sorted)
SortedDependenciesgetDependenciesOf in interface SortedDependencies<INPUT extends DependencyInfo>sorted - If true, get them in topologically sorted order. If false,
get them in the original order they were passed to the compiler.public List<INPUT> getInputsWithoutProvides()
getInputsWithoutProvides in interface SortedDependencies<INPUT extends DependencyInfo>Copyright © 2009-2015 Google. All Rights Reserved.