Top Description Constructors Methods
net.sf.ehcache.config.generator.model

public abstract Class AbstractDepthFirstVisitor

extends Object
implements NodeElementVisitor
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.config.generator.model.NodeElementVisitor
Known Direct Subclasses
net.sf.ehcache.config.generator.model.XMLGeneratorVisitor
Imports
java.util.List

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:
Author
Abhishek Sanoujam

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
doDfs(NodeElement element)

protected void
endAttributes(NodeElement
the element
element
)

Finish visiting attributes of the element.

protected void
endChildren(NodeElement
the element
element
)

Finish visiting children of the element.

protected void
endElement(NodeElement
the element
element
)

Finish visiting the element.

protected void
startAttributes(NodeElement
the element
element
)

Starts visiting the attributes of the element.

protected void
startChildren(NodeElement
the element
element
)

Starts visiting children of the element.

protected void
startElement(NodeElement
the element
element
)

Starts visiting an element.

public void
visit(NodeElement
the element to be visited
element
)

Implements net.sf.ehcache.config.generator.model.NodeElementVisitor.visit.

Visit the element
protected void
visitAttributes(NodeElement
the element
element
,
List<NodeAttribute>
the attributes
attributes
)

Visits the attributes of the element.

protected void
visitElement(NodeElement
the element
element
)

Visits the element.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractDepthFirstVisitorback to summary
public AbstractDepthFirstVisitor()

Method Detail

doDfsback to summary
private void doDfs(NodeElement element)
endAttributesback to summary
protected void endAttributes(NodeElement element)

Finish visiting attributes of the element. Override as needed

Parameters
element:NodeElement

the element

endChildrenback to summary
protected void endChildren(NodeElement element)

Finish visiting children of the element. Override as needed

Parameters
element:NodeElement

the element

endElementback to summary
protected void endElement(NodeElement element)

Finish visiting the element. Override as needed

Parameters
element:NodeElement

the element

startAttributesback to summary
protected void startAttributes(NodeElement element)

Starts visiting the attributes of the element. Override as needed

Parameters
element:NodeElement

the element

startChildrenback to summary
protected void startChildren(NodeElement element)

Starts visiting children of the element. Override as needed

Parameters
element:NodeElement

the element

startElementback to summary
protected void startElement(NodeElement element)

Starts visiting an element. Override as needed

Parameters
element:NodeElement

the element

visitback to summary
public void visit(NodeElement element)

Implements net.sf.ehcache.config.generator.model.NodeElementVisitor.visit.

Doc from net.sf.ehcache.config.generator.model.NodeElementVisitor.visit.

Visit the element

Parameters
element:NodeElement

the element to be visited

visitAttributesback to summary
protected void visitAttributes(NodeElement element, List<NodeAttribute> attributes)

Visits the attributes of the element. Override as needed

Parameters
element:NodeElement

the element

attributes:List<NodeAttribute>

the attributes

visitElementback to summary
protected void visitElement(NodeElement element)

Visits the element. Override as needed

Parameters
element:NodeElement

the element