public class InjectorGrapher extends Object
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...)
to specify an initial set of Class
es to
use, and this will graph their transitive bindings and dependencies.
Constructor and Description |
---|
InjectorGrapher(BindingTargetVisitor<Object,Collection<Key<?>>> keyVisitor,
BindingTargetVisitor<Object,Void> graphingVisitor,
Renderer renderer) |
Modifier and Type | Method and Description |
---|---|
void |
graph()
Renders a graph with the bound
Renderer . |
InjectorGrapher |
of(Injector injector)
Sets the
Injector to graph. |
InjectorGrapher |
rootedAt(Class<?>... classes)
Sets an initial group of
Class es to use as the starting point for
the graph. |
@Inject public InjectorGrapher(BindingTargetVisitor<Object,Collection<Key<?>>> keyVisitor, BindingTargetVisitor<Object,Void> graphingVisitor, Renderer renderer)
public InjectorGrapher of(Injector injector)
Injector
to graph.public InjectorGrapher rootedAt(Class<?>... classes)
Class
es to use as the starting point for
the graph. The graph will be of these classes and their transitive
dependencies and bindings.public void graph() throws IOException
Renderer
. The Injector
must have already been specified with of(Injector)
.IOException
Copyright © 2006-2012 Google, Inc.. All Rights Reserved.