com.google.gwt.inject.rebind.resolution
Class DependencyGraph
java.lang.Object
com.google.gwt.inject.rebind.resolution.DependencyGraph
public class DependencyGraph
- extends java.lang.Object
A graph of the dependency information between types that need to be injected
at a given injector, called the origin.
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:
- Pre-existing dependency nodes contain a
Key
and a
GinjectorBindings
. They represent keys that are already available on
some Ginjector in the hierarchy and visible to the origin.
- Internal dependency nodes represent bindings that are not already
created/available, but that can have implicit bindings created for them. They
contain the
Key
that the binding is for and the Binding
that
can be created.
- In addition, some nodes may represent errors. These contain a
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
public int size()
getOrigin
public GinjectorBindings getOrigin()
getDependenciesOf
public java.util.Collection<Dependency> getDependenciesOf(Key<?> key)
getDependenciesTargeting
public java.util.Collection<Dependency> getDependenciesTargeting(Key<?> key)
getAllKeys
public java.lang.Iterable<Key<?>> getAllKeys()
- Returns all the keys that appear in the Dependency Graph, other than the "common root",
Dependency.GINJECTOR
.