public class GraphvizGrapher extends AbstractInjectorGrapher
InjectorGrapher
implementation that writes out a Graphviz DOT
file of the graph. Dependencies are bound in GraphvizModule
.
Specify the PrintWriter
to output to with setOut(PrintWriter)
.
AbstractInjectorGrapher.GrapherParameters
Modifier and Type | Method and Description |
---|---|
protected void |
finish() |
protected String |
getArrowString(List<ArrowType> arrows)
|
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.
|
protected List<String> |
htmlEscape(List<String> elements) |
protected String |
htmlEscape(String str) |
protected void |
newBindingEdge(BindingEdge edge)
Adds a new binding edge to the graph.
|
protected void |
newDependencyEdge(DependencyEdge edge)
Adds a new dependency edge to the graph.
|
protected void |
newImplementationNode(ImplementationNode node)
Adds a new implementation node to the graph.
|
protected void |
newInstanceNode(InstanceNode node)
Adds a new instance node to the graph.
|
protected void |
newInterfaceNode(InterfaceNode node)
Adds a new interface node to the graph.
|
protected void |
postProcess()
Performs any post processing required after all nodes and edges have been added.
|
protected void |
renderEdge(GraphvizEdge edge) |
protected void |
renderNode(GraphvizNode node) |
protected void |
reset()
Resets the state of the grapher before rendering a new graph.
|
void |
setOut(PrintWriter out) |
void |
setRankdir(String rankdir) |
protected void |
start() |
graph, graph
protected void reset()
AbstractInjectorGrapher
reset
in class AbstractInjectorGrapher
public void setOut(PrintWriter out)
public void setRankdir(String rankdir)
protected void postProcess()
AbstractInjectorGrapher
postProcess
in class AbstractInjectorGrapher
protected void start()
protected void finish()
protected void renderNode(GraphvizNode node)
protected Map<String,String> getNodeAttributes(GraphvizNode node)
protected String getNodeLabel(GraphvizNode node)
ImplementationNode
s) rows for each of the member fields.protected void renderEdge(GraphvizEdge edge)
protected Map<String,String> getEdgeAttributes(GraphvizEdge edge)
protected String getEdgeEndPoint(String nodeId, String portId, CompassPoint compassPoint)
protected void newInterfaceNode(InterfaceNode node)
AbstractInjectorGrapher
newInterfaceNode
in class AbstractInjectorGrapher
protected void newImplementationNode(ImplementationNode node)
AbstractInjectorGrapher
newImplementationNode
in class AbstractInjectorGrapher
protected void newInstanceNode(InstanceNode node)
AbstractInjectorGrapher
newInstanceNode
in class AbstractInjectorGrapher
protected void newDependencyEdge(DependencyEdge edge)
AbstractInjectorGrapher
newDependencyEdge
in class AbstractInjectorGrapher
protected void newBindingEdge(BindingEdge edge)
AbstractInjectorGrapher
newBindingEdge
in class AbstractInjectorGrapher