public abstract static class ERXML.Item extends Object
Constructor and Description |
---|
Item()
Constructs a new Item.
|
Modifier and Type | Method and Description |
---|---|
ERXML.Doc |
doc()
Returns the XML document, or null if it isn't in a document.
|
ERXML.Item |
parent()
Returns the parent of this item, or null if there isn't one.
|
protected void |
setParent(ERXML.Item parent)
Sets the parent of the this item.
|
String |
toString()
Generates a formatted representation of this item.
|
abstract void |
visit(ERXML.Visitor visitor)
Visits this item and any of its children (if the visitor allows).
|
abstract void |
write(PrintWriter writer,
int indent)
Writes this item to the given writer with a certain indentation.
|
protected void |
writeEscapedString(String value,
PrintWriter writer)
Writes the given escaped String to the writer.
|
protected void |
writeIndent(int indent,
PrintWriter writer)
Writes an indentation to the writer.
|
protected void setParent(ERXML.Item parent)
parent
- the parent of the this itempublic ERXML.Item parent()
public ERXML.Doc doc()
public abstract void write(PrintWriter writer, int indent)
writer
- the writer to write toindent
- the current indentationpublic abstract void visit(ERXML.Visitor visitor)
visitor
- the visitor to visit withprotected void writeEscapedString(String value, PrintWriter writer)
value
- the string value to escapewriter
- the writer to write toprotected void writeIndent(int indent, PrintWriter writer)
indent
- the indentation to writewriter
- the writer to write toCopyright © 2002 – 2020 Project Wonder.