Package com.tonic.analysis.graph.export
Class DOTExporterConfig.Builder
- java.lang.Object
-
- com.tonic.analysis.graph.export.DOTExporterConfig.Builder
-
- Enclosing class:
- DOTExporterConfig
public static class DOTExporterConfig.Builder extends Object
Mutable accumulator for the exporter settings.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DOTExporterConfigbuild()DOTExporterConfig.BuilderclusterByMethod(boolean clusterByMethod)Controls whether nodes are grouped into per-method clusters.DOTExporterConfig.BuilderdefaultEdgeStyle(DOTExporterConfig.EdgeStyle defaultEdgeStyle)Sets the style applied to edges that carry no style of their own.DOTExporterConfig.BuilderdefaultNodeStyle(DOTExporterConfig.NodeStyle defaultNodeStyle)Sets the style applied to nodes that carry no style of their own.DOTExporterConfig.Builderdirected(boolean directed)Selects a digraph with arrow edges or a plain graph with undirected edges.DOTExporterConfig.BuilderfontName(String fontName)Sets the font applied to the graph, nodes and edges.DOTExporterConfig.BuilderfontSize(int fontSize)Sets the graph and node font size; edges are rendered two points smaller.DOTExporterConfig.BuildergraphName(String graphName)Sets the identifier written after the digraph keyword.DOTExporterConfig.BuilderincludeLegend(boolean includeLegend)Controls whether a legend subgraph is emitted.DOTExporterConfig.BuildermaxLabelLength(int maxLabelLength)Sets the label length at which truncation kicks in.DOTExporterConfig.BuilderrankDir(String rankDir)Sets the DOT rankdir, such as "TB" or "LR".DOTExporterConfig.BuildershowNodeIds(boolean showNodeIds)Controls whether node ids appear in node labels.DOTExporterConfig.BuildertruncateLabels(boolean truncateLabels)Controls whether over-long labels are cut down to the maximum length.
-
-
-
Method Detail
-
graphName
public DOTExporterConfig.Builder graphName(String graphName)
Sets the identifier written after the digraph keyword.- Parameters:
graphName- the DOT graph name- Returns:
- this builder
-
directed
public DOTExporterConfig.Builder directed(boolean directed)
Selects a digraph with arrow edges or a plain graph with undirected edges.- Parameters:
directed- true to emit a digraph- Returns:
- this builder
-
includeLegend
public DOTExporterConfig.Builder includeLegend(boolean includeLegend)
Controls whether a legend subgraph is emitted.- Parameters:
includeLegend- true to emit the legend- Returns:
- this builder
-
clusterByMethod
public DOTExporterConfig.Builder clusterByMethod(boolean clusterByMethod)
Controls whether nodes are grouped into per-method clusters.- Parameters:
clusterByMethod- true to cluster- Returns:
- this builder
-
showNodeIds
public DOTExporterConfig.Builder showNodeIds(boolean showNodeIds)
Controls whether node ids appear in node labels.- Parameters:
showNodeIds- true to show ids- Returns:
- this builder
-
truncateLabels
public DOTExporterConfig.Builder truncateLabels(boolean truncateLabels)
Controls whether over-long labels are cut down to the maximum length.- Parameters:
truncateLabels- true to truncate- Returns:
- this builder
-
maxLabelLength
public DOTExporterConfig.Builder maxLabelLength(int maxLabelLength)
Sets the label length at which truncation kicks in.- Parameters:
maxLabelLength- the character budget for a label- Returns:
- this builder
-
fontName
public DOTExporterConfig.Builder fontName(String fontName)
Sets the font applied to the graph, nodes and edges.- Parameters:
fontName- the font family name- Returns:
- this builder
-
fontSize
public DOTExporterConfig.Builder fontSize(int fontSize)
Sets the graph and node font size; edges are rendered two points smaller.- Parameters:
fontSize- the point size- Returns:
- this builder
-
rankDir
public DOTExporterConfig.Builder rankDir(String rankDir)
Sets the DOT rankdir, such as "TB" or "LR".- Parameters:
rankDir- the layout direction- Returns:
- this builder
-
defaultNodeStyle
public DOTExporterConfig.Builder defaultNodeStyle(DOTExporterConfig.NodeStyle defaultNodeStyle)
Sets the style applied to nodes that carry no style of their own.- Parameters:
defaultNodeStyle- the fallback node style- Returns:
- this builder
-
defaultEdgeStyle
public DOTExporterConfig.Builder defaultEdgeStyle(DOTExporterConfig.EdgeStyle defaultEdgeStyle)
Sets the style applied to edges that carry no style of their own.- Parameters:
defaultEdgeStyle- the fallback edge style- Returns:
- this builder
-
build
public DOTExporterConfig build()
- Returns:
- an immutable config holding the accumulated settings
-
-