MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / SgmlPage

Class SgmlPage

src/main/java/org/htmlunit/SgmlPage.java:51–451  ·  view source on GitHub ↗

A basic class of Standard Generalized Markup Language (SGML), e.g. HTML and XML. @author Ahmed Ashour @author Ronald Brill

Source from the content-addressed store, hash-verified

49 * @author Ronald Brill
50 */
51public abstract class SgmlPage extends DomNode implements Page, Document {
52
53 private DocumentType documentType_;
54 private final WebResponse webResponse_;
55 private WebWindow enclosingWindow_;
56 private final WebClient webClient_;
57 private boolean printing_;
58 private boolean domChangeListenerInUse_;
59 private boolean characterDataChangeListenerInUse_;
60
61 /**
62 * Creates an instance of SgmlPage.
63 *
64 * @param webResponse the web response that was used to create this page
65 * @param webWindow the window that this page is being loaded into
66 */
67 public SgmlPage(final WebResponse webResponse, final WebWindow webWindow) {
68 super(null);
69 webResponse_ = webResponse;
70 enclosingWindow_ = webWindow;
71 webClient_ = webWindow.getWebClient();
72 }
73
74 /**
75 * {@inheritDoc}
76 */
77 @Override
78 public void cleanUp() {
79 if (getWebClient().getCache().getCachedResponse(webResponse_.getWebRequest()) == null) {
80 webResponse_.cleanUp();
81 }
82 }
83
84 /**
85 * {@inheritDoc}
86 */
87 @Override
88 public WebResponse getWebResponse() {
89 return webResponse_;
90 }
91
92 /**
93 * Gets the name for the current node.
94 * @return the node name
95 */
96 @Override
97 public String getNodeName() {
98 return "#document";
99 }
100
101 /**
102 * Gets the type of the current node.
103 * @return the node type
104 */
105 @Override
106 public short getNodeType() {
107 return DOCUMENT_NODE;
108 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…