Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Nested Class Summary
`static class` | `DependencyGraph.Builder`
`static class` | `DependencyGraph.GraphPruner`

Method Summary
`java.lang.Iterable<Key<?>>` | `getAllKeys()` Returns all the keys that appear in the Dependency Graph, other than the "common root", `Dependency.GINJECTOR`.
`java.util.Collection<Dependency>` | `getDependenciesOf(Key<?> key)`
`java.util.Collection<Dependency>` | `getDependenciesTargeting(Key<?> key)`
`GinjectorBindings` | `getOrigin()`
`int` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD