public abstract class AbstractResourceVisitor extends Object
AbstractResourceVisitor helps in traversing a
resource tree by decoupling the actual traversal code
from application code. Concrete subclasses should implement
the ResourceVisitor#visit(Resource) method.| Constructor and Description |
|---|
AbstractResourceVisitor() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Resource res)
Visit the given resource and all its descendants.
|
protected void |
traverseChildren(Iterator<Resource> children)
Visit the given resources.
|
protected abstract void |
visit(Resource res)
Implement this method to do actual work on the resources.
|
public void accept(Resource res)
res - The resourceprotected void traverseChildren(Iterator<Resource> children)
children - The list of resourcesprotected abstract void visit(Resource res)
res - The resourceCopyright © 2015 The Apache Software Foundation. All rights reserved.