public class ResourceCollector extends Object implements ResourceVisitor
ResourceVisitor interface that collects the names of all resources
accepted by a given filter in a Set.| Modifier and Type | Field and Description |
|---|---|
private Filter<? super String> |
filter
Filter to accept resource-names. |
private Set<DataResource> |
resourceSet
Set to collect resource-names. |
| Constructor and Description |
|---|
ResourceCollector(Set<DataResource> resourceSet,
Filter<? super String> filter)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
visitPackage(String classpath)
This method is invoked for each traversed package.
|
void |
visitResource(String classpath)
This method is invoked for each resource.
|
private final Set<DataResource> resourceSet
Set to collect resource-names.public boolean visitPackage(String classpath)
visitPackage in interface ResourceVisitorclasspath - is the absolute classpath of the traversed package (e.g. "net/sf/mmm/util/reflect").true if the package should be traversed recursively, false if the
package and all its content (including sub-packages) should be skipped.public void visitResource(String classpath)
visitResource in interface ResourceVisitorclasspath - is the absolute classpath of the resource (e.g.
"net/sf/mmm/util/reflect/api/ReflectionUtil.class" or
"net/sf/mmm/util/reflect/beans-reflect.xml").Copyright © 2001–2015 mmm-Team. All rights reserved.