/ Published in: Java
Using http://www.clapper.org/software/java/util/javadocs/util/api/org/clapper/util/classutil/ClassFinder.html in order to find a class in class path.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
final ClassFinder finder = new ClassFinder(); finder.clear(); assertTrue(finder.add(moduleFile)); final ClassFilter filter = new AndClassFilter(new NotClassFilter(new InterfaceOnlyClassFilter()), new NotClassFilter(new AbstractClassFilter()), new SubclassClassFilter(UpdateTask.class)); Collection<ClassInfo> foundClasses = new ArrayList<ClassInfo>(); finder.findClasses(foundClasses, filter);