Class DOTExporterConfig.Builder

  • Enclosing class:
    DOTExporterConfig

    public static class DOTExporterConfig.Builder
    extends Object
    Mutable accumulator for the exporter settings.
    • Constructor Detail

      • Builder

        public Builder()
    • 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