1 7 8 package org.dom4j.tree; 9 10 import org.dom4j.Comment; 11 import org.dom4j.Element; 12 import org.dom4j.Node; 13 14 28 public class FlyweightComment extends AbstractComment implements Comment { 29 30 protected String text; 31 32 38 public FlyweightComment(String text) { 39 this.text = text; 40 } 41 42 public String getText() { 43 return text; 44 } 45 46 protected Node createXPathResult(Element parent) { 47 return new DefaultComment(parent, getText()); 48 } 49 } 50 51 87 | Popular Tags |