|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.util.ClassUtil
public class ClassUtil
ClassUtil file contains code used for loading all
implementations of specified interface or abstract class
found in classpath. As a result of calling some functions you can have
Set containing all required classes.
Created: Wed Oct 6 08:25:52 2004
| Constructor Summary | |
|---|---|
ClassUtil()
|
|
| Method Summary | ||
|---|---|---|
static Set<Class> |
getClassesFromClassPath()
Method description |
|
static Set<Class> |
getClassesFromNames(Set<String> names)
Method description |
|
static
|
getClassesImplementing(Set<Class> classes,
T cls)
Method description |
|
static
|
getClassesImplementing(T cls)
Method description |
|
static String |
getClassNameFromFileName(String fileName)
Method description |
|
static Set<String> |
getClassNamesFromDir(File dir)
Method description |
|
static Set<String> |
getClassNamesFromJar(File jarFile)
Method description |
|
static Set<String> |
getFileListDeep(File path)
Method description |
|
static
|
getImplementations(Class<T> obj)
Method description |
|
static void |
walkInDirForFiles(File base_dir,
String path,
Set<String> set)
Method description |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassUtil()
| Method Detail |
|---|
public static String getClassNameFromFileName(String fileName)
fileName -
public static Set<String> getClassNamesFromDir(File dir)
dir -
public static Set<String> getClassNamesFromJar(File jarFile)
throws IOException
jarFile -
IOException
public static Set<Class> getClassesFromClassPath()
throws IOException,
ClassNotFoundException
ClassNotFoundException
IOException
public static Set<Class> getClassesFromNames(Set<String> names)
throws ClassNotFoundException
names -
ClassNotFoundException
public static <T extends Class> Set<T> getClassesImplementing(Set<Class> classes,
T cls)
T - classes - cls -
public static <T extends Class> Set<T> getClassesImplementing(T cls)
throws IOException,
ClassNotFoundException
T - cls -
ClassNotFoundException
IOExceptionpublic static Set<String> getFileListDeep(File path)
path -
public static <T> Set<T> getImplementations(Class<T> obj)
throws IOException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException
T - obj -
ClassNotFoundException
IOException
IllegalAccessException
InstantiationException
public static void walkInDirForFiles(File base_dir,
String path,
Set<String> set)
base_dir - path - set -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||