-
Notifications
You must be signed in to change notification settings - Fork 179
Grapher Integration
Randgalt edited this page Dec 3, 2012
·
1 revision
Governator integrates the Guice Grapher that enables visualizing your injection hierarchy. See here for more details about Grapher.
To create the graph, either allocate or inject an instance of Governator’s Grapher
class and then call one of its generation methods. E.g.
@AutoBindSingleton
public class GraphFileCreator
{
private final Grapher grapher;
@Inject
public GraphFileCreator(Grapher grapher)
{
this.grapher = grapher;
}
@PostConstruct
public void createGraphFile() throws Exception
{
grapher.toFile(new File("mygraph.dot"));
}
}
This will create a file named “mygraph.dot” in the working directory that can be viewed with XDot.
- Home
- Getting Started
- Bootstrapping
- Lifecycle Management
- Auto Binding
- Module-Dependencies
- Warm Up
- Configuration Mapping
- Field Validation
- Lazy Singleton
- Concurrent Singleton
- Generic Binding Annotations
- LifecycleListener
- Governator Phases
- Grapher Integration
- JUnit Testing
- FAQ
- Best Practices
- Spring, PicoContainer, Etc.
- Javadoc
- End-to-End Examples