Class AbstractInjectorGrapher

  • All Implemented Interfaces:
    InjectorGrapher
    Direct Known Subclasses:
    GraphvizGrapher

    public abstract class AbstractInjectorGrapher
    extends Object
    implements InjectorGrapher
    Abstract injector grapher that builds the dependency graph but doesn't render it.
    Since:
    4.0
    Author:
    bojand@google.com (Bojan Djordjevic)
    • Method Detail

      • graph

        public final void graph​(com.google.inject.Injector injector)
                         throws IOException
        Description copied from interface: InjectorGrapher
        Graphs the guice dependency graph for the given injector using default starting keys.
        Specified by:
        graph in interface InjectorGrapher
        Throws:
        IOException
      • graph

        public final void graph​(com.google.inject.Injector injector,
                                Set<com.google.inject.Key<?>> root)
                         throws IOException
        Description copied from interface: InjectorGrapher
        Graphs the guice dependency graph for the given injector using the given starting keys and their transitive dependencies.
        Specified by:
        graph in interface InjectorGrapher
        Throws:
        IOException
      • reset

        protected abstract void reset()
                               throws IOException
        Resets the state of the grapher before rendering a new graph.
        Throws:
        IOException
      • postProcess

        protected abstract void postProcess()
                                     throws IOException
        Performs any post processing required after all nodes and edges have been added.
        Throws:
        IOException