MCPcopy Create free account
hub / github.com/cschanck/single-file-java / emit

Method emit

src/main/java/org/sfj/DrawDot.java:647–676  ·  view source on GitHub ↗
(Graph parent, PrintWriter writer, String indent)

Source from the content-addressed store, hash-verified

645 }
646
647 public void emit(Graph parent, PrintWriter writer, String indent) {
648 for (String s : commentsBefore) {
649 writer.println(indent + "// " + s);
650 }
651 writer.print(indent);
652 writer.print('"' + from.id() + '"');
653 if (fromPort != null) {
654 writer.print(":\"" + fromPort + '"');
655 }
656 writer.print(parent.directed ? " -> " : " -- ");
657 writer.print('"' + to.id() + '"');
658 if (toPort != null) {
659 writer.print(":\"" + toPort + '"');
660 }
661 LinkedList<String> opts = new LinkedList<>();
662 emit(opts);
663 if (head != null) {
664 head.emit(opts);
665 }
666 if (tail != null) {
667 tail.emit(opts);
668 }
669 if (!opts.isEmpty()) {
670 writer.print(" " + opts);
671 }
672 writer.println();
673 for (String s : commentsAfter) {
674 writer.println(indent + "// " + s);
675 }
676 }
677
678 public Connection head(Arrow head) {
679 this.head = head;

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
printMethod · 0.65
idMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected