public final class Es6SortedDependencies<INPUT extends DependencyInfo> extends java.lang.Object implements SortedDependencies<INPUT>
Orders such that each input always comes after its dependencies. Circular references are allowed by emitting the current input in the moment before a loop would complete.
The resulting order is not the same as the user-provided order but is influenced by it since it may take more than one graph traversal to account for all provided inputs and the graph traversals start with the first user provided input and continue from there.
Also exposes other information about the inputs, like which inputs do not provide symbols.
SortedDependencies.MissingProvideException
Constructor and Description |
---|
Es6SortedDependencies(java.util.List<INPUT> userOrderedInputs) |
Modifier and Type | Method and Description |
---|---|
java.util.List<INPUT> |
getDependenciesOf(java.util.List<INPUT> rootInputs,
boolean sorted)
Gets all the dependencies of the given roots.
|
INPUT |
getInputProviding(java.lang.String symbolName)
Return the input that gives us the given symbol.
|
java.util.List<INPUT> |
getInputsWithoutProvides() |
java.util.List<INPUT> |
getSortedDependenciesOf(java.util.List<INPUT> roots)
Gets all the dependencies of the given roots.
|
java.util.List<INPUT> |
getSortedList() |
INPUT |
maybeGetInputProviding(java.lang.String symbol)
Return the input that gives us the given symbol, or null.
|
public Es6SortedDependencies(java.util.List<INPUT> userOrderedInputs)
public java.util.List<INPUT> getDependenciesOf(java.util.List<INPUT> rootInputs, boolean sorted)
SortedDependencies
getDependenciesOf
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 INPUT getInputProviding(java.lang.String symbolName) throws SortedDependencies.MissingProvideException
SortedDependencies
getInputProviding
in interface SortedDependencies<INPUT extends DependencyInfo>
SortedDependencies.MissingProvideException
- An exception if there is no
input for this symbol.public java.util.List<INPUT> getInputsWithoutProvides()
getInputsWithoutProvides
in interface SortedDependencies<INPUT extends DependencyInfo>
public java.util.List<INPUT> getSortedDependenciesOf(java.util.List<INPUT> roots)
SortedDependencies
getSortedDependenciesOf
in interface SortedDependencies<INPUT extends DependencyInfo>
public java.util.List<INPUT> getSortedList()
getSortedList
in interface SortedDependencies<INPUT extends DependencyInfo>
public INPUT maybeGetInputProviding(java.lang.String symbol)
SortedDependencies
maybeGetInputProviding
in interface SortedDependencies<INPUT extends DependencyInfo>
Copyright © 2009-2017 Google. All Rights Reserved.