Class DotDumper<N>

java.lang.Object
pascal.taie.util.graph.DotDumper<N>
Type Parameters:
N - type of graph nodes

public class DotDumper<N> extends Object
Configurable dot dumper.
  • Constructor Details

    • DotDumper

      public DotDumper()
  • Method Details

    • setNodeToString

      public DotDumper<N> setNodeToString(Function<N,String> nodeToString)
    • setGlobalNodeAttributes

      public DotDumper<N> setGlobalNodeAttributes(DotAttributes attrs)
    • setNodeLabeler

      public DotDumper<N> setNodeLabeler(Function<N,String> nodeLabeler)
    • setNodeAttributer

      public DotDumper<N> setNodeAttributer(Function<N,DotAttributes> nodeAttributer)
    • setEdgeLabeler

      public DotDumper<N> setEdgeLabeler(Function<Edge<N>,String> edgeLabeler)
    • setGlobalEdgeAttributes

      public DotDumper<N> setGlobalEdgeAttributes(DotAttributes attrs)
    • setEdgeAttributer

      public DotDumper<N> setEdgeAttributer(Function<Edge<N>,DotAttributes> edgeAttributer)
    • dump

      public void dump(Graph<N> graph, File output)
    • dumpOthers

      protected void dumpOthers()
      Subclasses can override this method to dump other information other than type parameter <N>.
    • dumpElement

      protected <T> void dumpElement(T elem, Function<T,String> toString, Function<T,String> labeler, Function<T,DotAttributes> attributer)
      Dumps an element (either a node or an edge).
      Type Parameters:
      T - type of the element
      Parameters:
      elem - element to be dumped
      toString - function that returns string representation of elem
      labeler - function that returns label of elem
      attributer - function that returns attributes of elem