public class

InjectorGrapher

extends Object
java.lang.Object
   ↳ com.google.inject.grapher.InjectorGrapher

Class Overview

Root class for graphing an Injector. Bound in GrapherModule.

Use of(Injector) to specify the Injector to use, and graph() to graph the Injector using the currently-bound Renderer.

By default, this will graph the entire Injector. Use rootedAt(Class) or rootedAt(Key) to specify an initial set of Classes or Keys to use, and this will graph their transitive bindings and dependencies.

Summary

Public Constructors
InjectorGrapher(BindingTargetVisitor<Object, Collection<Key<?>>> keyVisitor, BindingTargetVisitor<Object, Void> graphingVisitor, Renderer renderer)
Public Methods
void graph()
Renders a graph with the bound Renderer.
InjectorGrapher of(Injector injector)
Sets the Injector to graph.
InjectorGrapher rootedAt(Key...<?> keys)
Sets an initial group of Keys to use as the starting point for the graph.
InjectorGrapher rootedAt(Class...<?> classes)
Sets an initial group of Classes to use as the starting point for the graph.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public InjectorGrapher (BindingTargetVisitor<Object, Collection<Key<?>>> keyVisitor, BindingTargetVisitor<Object, Void> graphingVisitor, Renderer renderer)

Public Methods

public void graph ()

Renders a graph with the bound Renderer. The Injector must have already been specified with of(Injector).

Throws
IOException

public InjectorGrapher of (Injector injector)

Sets the Injector to graph.

public InjectorGrapher rootedAt (Key...<?> keys)

Sets an initial group of Keys to use as the starting point for the graph. The graph will be of these keys and their transitive dependencies and bindings.

public InjectorGrapher rootedAt (Class...<?> classes)

Sets an initial group of Classes to use as the starting point for the graph. The graph will be of these classes and their transitive dependencies and bindings.