public abstract class AbstractResourceVisitor
extends java.lang.Object
AbstractResourceVisitor
helps in traversing a
resource tree by decoupling the actual traversal code
from application code. Concrete subclasses should implement
the 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(java.util.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(@Nonnull java.util.Iterator<Resource> children)
children
- The list of resourcesprotected abstract void visit(@Nonnull Resource res)
res
- The resourceCopyright © 2018 The Apache Software Foundation. All rights reserved.