public class

GraphvizRenderer

extends Object
implements NodeAliasFactory<K> Renderer
java.lang.Object
   ↳ com.google.inject.grapher.graphviz.GraphvizRenderer

Class Overview

Renderer implementation that writes out a Graphviz DOT file of the graph. Bound in GraphvizModule.

Specify the PrintWriter to output to with setOut(PrintWriter).

Summary

Public Constructors
GraphvizRenderer()
Public Methods
void addEdge(GraphvizEdge edge)
void addNode(GraphvizNode node)
void newAlias(String fromId, String toId)
void render()
GraphvizRenderer setOut(PrintWriter out)
GraphvizRenderer setRankdir(String rankdir)
Protected Methods
void finish()
String getArrowString(List<ArrowType> arrows)
Turns a List of ArrowTypes into a String that represents combining them.
Map<String, String> getEdgeAttributes(GraphvizEdge edge)
String getEdgeEndPoint(String nodeId, String portId, CompassPoint compassPoint)
Map<String, String> getGraphAttributes()
Map<String, String> getNodeAttributes(GraphvizNode node)
String getNodeLabel(GraphvizNode node)
Creates the "label" for a node.
String htmlEscape(String str)
void renderEdge(GraphvizEdge edge)
void renderNode(GraphvizNode node)
String resolveAlias(String id)
void start()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.inject.grapher.NodeAliasFactory
From interface com.google.inject.grapher.Renderer

Public Constructors

public GraphvizRenderer ()

Public Methods

public void addEdge (GraphvizEdge edge)

public void addNode (GraphvizNode node)

public void newAlias (String fromId, String toId)

public void render ()

public GraphvizRenderer setOut (PrintWriter out)

public GraphvizRenderer setRankdir (String rankdir)

Protected Methods

protected void finish ()

protected String getArrowString (List<ArrowType> arrows)

Turns a List of ArrowTypes into a String that represents combining them. With Graphviz, that just means concatenating them.

protected Map<String, String> getEdgeAttributes (GraphvizEdge edge)

protected String getEdgeEndPoint (String nodeId, String portId, CompassPoint compassPoint)

protected Map<String, String> getGraphAttributes ()

protected Map<String, String> getNodeAttributes (GraphvizNode node)

protected String getNodeLabel (GraphvizNode node)

Creates the "label" for a node. This is a string of HTML that defines a table with a heading at the top and (in the case of ImplementationNodes) rows for each of the member fields.

protected String htmlEscape (String str)

protected void renderEdge (GraphvizEdge edge)

protected void renderNode (GraphvizNode node)

protected String resolveAlias (String id)

protected void start ()