public class DependencyGraph extends Object
A DependencyGraph
consists of a set of dependencies linking
dependency nodes (keys). Each edge explains how a particular node came to be
required: for instance, a key may be required in the @Inject
constructor of a class, or it might be required by the Ginjector. There are
two kinds of dependency nodes:
Key
and a
GinjectorBindings
. They represent keys that are already available on
some Ginjector in the hierarchy and visible to the origin.Key
that the binding is for and the Binding
that
can be created.Key
and a String
describing the error. These nodes are created for keys
that do not already exist and for which we cannot create an implicit binding.
Modifier and Type | Class and Description |
---|---|
static class |
DependencyGraph.Builder |
static class |
DependencyGraph.GraphPruner |
Modifier and Type | Method and Description |
---|---|
Iterable<Key<?>> |
getAllKeys()
Returns all the keys that appear in the Dependency Graph, other than the "common root",
Dependency.GINJECTOR . |
Collection<Dependency> |
getDependenciesOf(Key<?> key) |
Collection<Dependency> |
getDependenciesTargeting(Key<?> key) |
GinjectorBindings |
getOrigin() |
int |
size() |
public int size()
public GinjectorBindings getOrigin()
public Collection<Dependency> getDependenciesOf(Key<?> key)
public Collection<Dependency> getDependenciesTargeting(Key<?> key)
public Iterable<Key<?>> getAllKeys()
Dependency.GINJECTOR
.Copyright © 2008–2018. All rights reserved.