Top Description Fields Constructors Methods
org.dom4j.tree

public Class FlyweightComment

extends AbstractComment
implements Comment
Class Inheritance
All Implemented Interfaces
org.dom4j.Comment, org.dom4j.CharacterData, org.dom4j.Node, java.lang.Cloneable
Known Direct Subclasses
org.dom4j.tree.DefaultComment
Imports
org.dom4j.Comment, .Element, .Node

FlyweightComment is a Flyweight pattern implementation of a singly linked, read-only XML Comment.

This node could be shared across documents and elements though it does not support the parent relationship.

Author
James Strachan
Version
$Revision: 1.7 $

Field Summary

Modifier and TypeField and Description
protected String
text

Text of the Comment node

Constructor Summary

AccessConstructor and Description
public
FlyweightComment(String
is the Comment text
text
)

DOCUMENT ME!

Method Summary

Modifier and TypeMethod and Description
protected Node
public String
getText()

Overrides org.dom4j.tree.AbstractNode.getText.

Implements org.dom4j.Node.getText.

Returns the text of this node.

Inherited from org.dom4j.tree.AbstractComment:
acceptasXMLgetNodeTypegetPathgetUniquePathtoStringwrite

Field Detail

textback to summary
protected String text

Text of the Comment node

Constructor Detail

FlyweightCommentback to summary
public FlyweightComment(String text)

DOCUMENT ME!

Parameters
text:String

is the Comment text

Method Detail

createXPathResultback to summary
protected Node createXPathResult(Element parent)

Overrides org.dom4j.tree.AbstractNode.createXPathResult.

getTextback to summary
public String getText()

Overrides org.dom4j.tree.AbstractNode.getText.

Implements org.dom4j.Node.getText.

Doc from org.dom4j.Node.getText.

Returns the text of this node.

Returns:String

the text for this node.