public class ClasspathUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static Log |
log |
| Constructor and Description |
|---|
ClasspathUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class |
locateClass(java.lang.String name)
Return the Class object of the specified class name by searching the
current classpath and the system classpath.
|
static java.lang.Class[] |
locateClasses(java.lang.String[] classNames)
Return an array of Class objects for each of the class names specified.
|
static java.net.URL |
locateResource(java.lang.String name)
Return the location of the specified resource by searching the user home
directory, the current classpath and the system classpath.
|
static java.net.URL |
locateResource(java.lang.String base,
java.lang.String name)
Return the location of the specified resource by searching the user home
directory, the current classpath and the system classpath.
|
public static java.lang.Class locateClass(java.lang.String name)
throws java.lang.ClassNotFoundException
name - the name of the classClass instancejava.lang.ClassNotFoundExceptionpublic static java.lang.Class[] locateClasses(java.lang.String[] classNames)
throws java.lang.ClassNotFoundException
classNames - the names of the classes to loadClass[] arrayjava.lang.ClassNotFoundExceptionpublic static java.net.URL locateResource(java.lang.String base,
java.lang.String name)
base - the base path of the resourcename - the name of the resourcenull if it has not
been foundpublic static java.net.URL locateResource(java.lang.String name)
name - the name of the resourcenull if it has not
been found