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

Class HtmlDoc

htmlflow-core/src/main/java/htmlflow/HtmlDoc.java:35–70  ·  view source on GitHub ↗

Static Html view. @author Miguel Gamboa, Luís Duare

Source from the content-addressed store, hash-verified

33 * @author Miguel Gamboa, Luís Duare
34 */
35public class HtmlDoc extends HtmlPage {
36
37 private final HtmlDocVisitor visitor;
38
39 HtmlDoc(HtmlDocVisitor visitor) {
40 this.visitor = visitor;
41 }
42
43 public final Html<HtmlPage> html() {
44 this.getVisitor().write(HEADER);
45 return new Html<>(this);
46 }
47
48 @Override
49 public String getName() {
50 return "HtmlDoc";
51 }
52
53 @Override
54 public HtmlPage setIndented(boolean isIndented) {
55 return new HtmlDoc(getVisitor().clone(isIndented));
56 }
57
58 @Override
59 public HtmlPage threadSafe() {
60 throw new IllegalStateException(
61 "HtmlDoc is not reusable and does not keep internal static blocks!" +
62 "Thus it does not require thread safety!"
63 );
64 }
65
66 @Override
67 public HtmlDocVisitor getVisitor() {
68 return visitor;
69 }
70}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected