Package pascal.taie.util.graph
Class DotDumper<N>
java.lang.Object
pascal.taie.util.graph.DotDumper<N>
- Type Parameters:
N
- type of graph nodes
Configurable dot dumper.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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).protected void
Subclasses can override this method to dump other information other than type parameter<N>
.setEdgeAttributer
(Function<Edge<N>, DotAttributes> edgeAttributer) setEdgeLabeler
(Function<Edge<N>, String> edgeLabeler) setNodeAttributer
(Function<N, DotAttributes> nodeAttributer) setNodeLabeler
(Function<N, String> nodeLabeler) setNodeToString
(Function<N, String> nodeToString)
-
Constructor Details
-
DotDumper
public DotDumper()
-
-
Method Details
-
setNodeToString
-
setGlobalNodeAttributes
-
setNodeLabeler
-
setNodeAttributer
-
setEdgeLabeler
-
setGlobalEdgeAttributes
-
setEdgeAttributer
-
dump
-
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 dumpedtoString
- function that returns string representation ofelem
labeler
- function that returns label ofelem
attributer
- function that returns attributes ofelem
-