Static Html view. @author Miguel Gamboa, Luís Duare
| 33 | * @author Miguel Gamboa, Luís Duare |
| 34 | */ |
| 35 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected