1 7 8 package org.dom4j.tree; 9 10 import org.dom4j.Element; 11 import org.dom4j.Node; 12 import org.dom4j.Text; 13 14 28 public class FlyweightText extends AbstractText implements Text { 29 30 protected String text; 31 32 38 public FlyweightText(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 DefaultText(parent, getText()); 48 } 49 } 50 51 87 | Popular Tags |