@Test public void testClonesDeclarations() { Document doc = Jsoup.parse("<!DOCTYPE html><html><head><title>Doctype test"); Document clone = (Document) doc.clone(); assertEquals(doc.html(), clone.html()); assertEquals("<!doctype html><html><head><title>Doctype test</title></head><body></body></html>", TextUtil.stripNewlines(clone.html())); }
@Override public Object clone() { Document clone = (Document) super.clone(); clone.outputSettings = (OutputSettings) this.outputSettings.clone(); return clone; }
Document extends Element { @Override public Object clone() { Document clone = (Document) super.clone(); clone.outputSettings = (OutputSettings) this.outputSettings.clone(); return clone; } }
Document extends Element { @Override public Object clone() { Document clone = (Document) super.clone(); clone.outputSettings = (OutputSettings) this.outputSettings.clone(); return clone; } Document(String baseUri); }
Document extends Element { @Override public Object clone() { Document clone = (Document) super.clone(); clone.outputSettings = (OutputSettings) this.outputSettings.clone(); return clone; } Document(String baseUri); static Document createShell(String baseUri); String location(); Element head(); Element body(); String title(); void title(String title); Element createElement(String tagName); Document normalise(); @Override String outerHtml(); @Override Element text(String text); @Override String nodeName(); void charset(Charset charset); Charset charset(); void updateMetaCharsetElement(boolean update); boolean updateMetaCharsetElement(); @Override Object clone(); OutputSettings outputSettings(); Document outputSettings(OutputSettings outputSettings); QuirksMode quirksMode(); Document quirksMode(QuirksMode quirksMode); }
Document extends Element { @Override public Object clone() { Document clone = (Document) super.clone(); clone.outputSettings = (OutputSettings) this.outputSettings.clone(); return clone; } Document(String baseUri); static Document createShell(String baseUri); String location(); Element head(); Element body(); String title(); void title(String title); Element createElement(String tagName); Document normalise(); @Override String outerHtml(); @Override Element text(String text); @Override String nodeName(); void charset(Charset charset); Charset charset(); void updateMetaCharsetElement(boolean update); boolean updateMetaCharsetElement(); @Override Object clone(); OutputSettings outputSettings(); Document outputSettings(OutputSettings outputSettings); QuirksMode quirksMode(); Document quirksMode(QuirksMode quirksMode);  }