|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.inject.rebind.resolution.PathFinder
public class PathFinder
Finds the shortest path from the edges in the root set to any of one or more destination keys.
This is used in EagerCycleFinder
and UnresolvedBindingValidator
for explaining
why a given error/cycle was reachable from the Ginjector.
Constructor Summary | |
---|---|
PathFinder()
|
Method Summary | |
---|---|
PathFinder |
addDestinations(Key<?>... destinations)
Add destinations to be used for the next search. |
PathFinder |
addRoots(Key<?>... roots)
|
java.util.List<Dependency> |
findShortestPath()
Find the shortest path from an unresolved edge in the roots to a key in the destinations. |
PathFinder |
onGraph(DependencyGraph graph)
|
PathFinder |
withOnlyRequiredEdges(boolean onlyRequiredEdges)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathFinder()
Method Detail |
---|
public PathFinder onGraph(DependencyGraph graph)
public PathFinder addRoots(Key<?>... roots)
public PathFinder addDestinations(Key<?>... destinations)
findShortestPath()
.
public PathFinder withOnlyRequiredEdges(boolean onlyRequiredEdges)
onlyRequiredEdges
- if true, only required edges will be considered when searching for the
pathpublic java.util.List<Dependency> findShortestPath()
Implemented as a Breadth-first search from the destination set back to the origin.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |