public class ClassNameCollector extends Object implements ResourceVisitor
ResourceVisitor
interface that collects the names of all classes
accepted
by a given filter in a Set
.Modifier and Type | Field and Description |
---|---|
private Set<String> |
classNameSet
Set to collect class-names. |
private Filter<? super String> |
filter
Filter to accept class-names. |
private static String |
SUFFIX_CLASS
Suffix for classes as resource.
|
Constructor and Description |
---|
ClassNameCollector(Set<String> classNameSet,
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 static final String SUFFIX_CLASS
public boolean visitPackage(String classpath)
ResourceVisitor
visitPackage
in interface ResourceVisitor
classpath
- 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)
ResourceVisitor
visitResource
in interface ResourceVisitor
classpath
- 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–2016 mmm-Team. All rights reserved.