|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.config.generator.model.AbstractDepthFirstVisitor
public abstract class AbstractDepthFirstVisitor
Implementation of NodeElementVisitor
that does a depth-first traversal of the element. Depth first means the visit starts at the
element and goes deeper and deeper in each child element until there are no children and then backtracks, doing the same thing for each
children in each child element.
This class is an abstract class and provides empty methods that sub-classes can override as needed. The visit methods in this class are
called in this order for each element visited by this visitor:
startElement(NodeElement)
startAttributes(NodeElement)
visitAttributes(NodeElement, List)
endAttributes(NodeElement)
visitElement(NodeElement)
startChildren(NodeElement)
endChildren(NodeElement)
endElement(NodeElement)
Constructor Summary | |
---|---|
AbstractDepthFirstVisitor()
|
Method Summary | |
---|---|
protected void |
endAttributes(NodeElement element)
Finish visiting attributes of the element. |
protected void |
endChildren(NodeElement element)
Finish visiting children of the element. |
protected void |
endElement(NodeElement element)
Finish visiting the element. |
protected void |
startAttributes(NodeElement element)
Starts visiting the attributes of the element. |
protected void |
startChildren(NodeElement element)
Starts visiting children of the element. |
protected void |
startElement(NodeElement element)
Starts visiting an element. |
void |
visit(NodeElement element)
Visit the element |
protected void |
visitAttributes(NodeElement element,
List<NodeAttribute> attributes)
Visits the attributes of the element. |
protected void |
visitElement(NodeElement element)
Visits the element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractDepthFirstVisitor()
Method Detail |
---|
public void visit(NodeElement element)
visit
in interface NodeElementVisitor
element
- the element to be visitedprotected void startElement(NodeElement element)
element
- the elementprotected void startAttributes(NodeElement element)
element
- the elementprotected void visitAttributes(NodeElement element, List<NodeAttribute> attributes)
element
- the elementattributes
- the attributesprotected void endAttributes(NodeElement element)
element
- the elementprotected void visitElement(NodeElement element)
element
- the elementprotected void startChildren(NodeElement element)
element
- the elementprotected void endChildren(NodeElement element)
element
- the elementprotected void endElement(NodeElement element)
element
- the element
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |