|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.reflect.base.ClassNameCollector
public class ClassNameCollector
This is an implementation of the ResourceVisitor interface that
collects the names of all classes accepted by a
given filter in a Set.
| Field Summary | |
|---|---|
private Set<String> |
classNameSet
Set to collect class-names. |
private Filter<String> |
filter
Filter to accept class-names. |
private static String |
SUFFIX_CLASS
Suffix for classes as resource. |
| Constructor Summary | |
|---|---|
ClassNameCollector(Set<String> classNameSet,
Filter<String> filter)
The constructor. |
|
| Method Summary | |
|---|---|
boolean |
visitPackage(String classpath)
This method is invoked for each traversed package. |
void |
visitResource(String classpath)
This method is invoked for each resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String SUFFIX_CLASS
private final Set<String> classNameSet
Set to collect class-names.
private final Filter<String> filter
Filter to accept class-names.
| Constructor Detail |
|---|
public ClassNameCollector(Set<String> classNameSet,
Filter<String> filter)
classNameSet - is the Set where collected Class-names
will be added.filter - is used to filter classes by
name.| Method Detail |
|---|
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").
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||