AbstractComment is an abstract base class for tree
implementors to use for implementation inheritence.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(Visitor
is the visitor in the Visitor Pattern visitor)Implements org.
|
| public String | |
| public short | getNodeType()
Overrides org. Implements org. |
| public String | getPath(Element
is the parent context from which the relative path should
start. If the context is null or the context is not an
ancestor of this node then the path will be absolute and start
from the document and so begin with the '/' character. context)Overrides org. Implements org. |
| public String | getUniquePath(Element
is the parent context from which the path should start. If the
context is null or the context is not an ancestor of this node
then the path will start from the document and so begin with
the '/' character. context)Overrides org. Implements org. Returns the relative unique XPath expression from the given context which will return a nodeset of one node which is the current node. |
| public String | |
| public void | write(Writer
is the writer)Writer to output the XML toOverrides org. Implements org.
|
| AbstractComment | back to summary |
|---|---|
| public AbstractComment() | |
| accept | back to summary |
|---|---|
| public void accept(Visitor visitor) Implements org. Doc from org.
| |
| asXML | back to summary |
|---|---|
| public String asXML() Implements org. Doc from org.
| |
| getNodeType | back to summary |
|---|---|
| public short getNodeType() Overrides org. Implements org. Doc from org. Returns the code according to the type of node. This makes processing nodes polymorphically much easier as the switch statement can be used instead of multiple if (instanceof) statements.
| |
| getPath | back to summary |
|---|---|
| public String getPath(Element context) Overrides org. Implements org. Doc from org. Returns the relative XPath expression which will return a node set containing the given node such as a/b/@c. No indexing will be used to restrict the path if multiple elements with the same name occur on the path.
| |
| getUniquePath | back to summary |
|---|---|
| public String getUniquePath(Element context) Overrides org. Implements org. Doc from org. Returns the relative unique XPath expression from the given context which will return a nodeset of one node which is the current node. This method will use the XPath index operator to restrict the path if multiple elements with the same name occur on the path.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| write | back to summary |
|---|---|
| public void write(Writer writer) throws IOException Overrides org. Implements org. Doc from org.
| |