MCPcopy Create free account
hub / github.com/xmlet/HtmlFlow / HtmlView

Method HtmlView

htmlflow-core/src/main/java/htmlflow/HtmlView.java:63–78  ·  view source on GitHub ↗

Auxiliary constructor used by clone().

(
        Supplier<HtmlVisitor> visitorSupplier,
        HtmlTemplate template,
        boolean threadSafe
    )

Source from the content-addressed store, hash-verified

61
62 /** Auxiliary constructor used by clone(). */
63 HtmlView(
64 Supplier<HtmlVisitor> visitorSupplier,
65 HtmlTemplate template,
66 boolean threadSafe
67 ) {
68 this.visitorSupplier = visitorSupplier;
69 this.template = template;
70 this.threadSafe = threadSafe;
71 if (threadSafe) {
72 this.visitor = null;
73 this.threadLocalVisitor = ThreadLocal.withInitial(visitorSupplier);
74 } else {
75 this.visitor = visitorSupplier.get();
76 this.threadLocalVisitor = null;
77 }
78 }
79
80 public final Html<HtmlPage> html() {
81 this.getVisitor().write(HEADER);

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected