|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norconex.commons.lang.ClassFinder
public final class ClassFinder
Utility class for finding names of classes implementing an interface or class in directories or JAR files. In order to find if a class is potential candidate, it is "loaded" first, but into a temporary class loader. Still, if it is important to you that classes do not get loaded, you can use other approaches, such as byte-code scanning. See Apache ClassScan sandbox project for code that does that.
Method Summary | |
---|---|
static List<String> |
findImplementors(File file,
Class<?> superClass)
Finds the names of all classes implementing the super class. |
static List<String> |
findImplementors(List<File> files,
Class<?> superClass)
Finds the names of all classes implementing the super class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<String> findImplementors(List<File> files, Class<?> superClass)
files
- directories and JARs to scan for classessuperClass
- the class from which to find implementors
public static List<String> findImplementors(File file, Class<?> superClass)
file
- directory or JAR to scan for classessuperClass
- the class from which to find implementors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |