public class ClassLoaderUtil
extends java.lang.Object
Constructor and Description |
---|
ClassLoaderUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
hasClass(java.lang.Class<T> type,
java.lang.ClassLoader classloader)
Check whether a classloader can load the given class.
|
static <T> java.lang.Class<T> |
loadClass(java.lang.Class<T> type,
java.lang.ClassLoader classloader)
Loads a class with a specific classloader, wraps the
ClassNotFoundException in a runtime exeception. |
static <T> java.lang.Class<T> |
loadClass(java.lang.String className)
Loads a class from the current classloader
|
static <T> java.lang.Class<T> |
loadClass(java.lang.String className,
java.lang.ClassLoader classloader)
Load a class from a specific classloader
|
public static <T> java.lang.Class<T> loadClass(java.lang.Class<T> type, java.lang.ClassLoader classloader)
ClassNotFoundException
in a runtime exeception.public static <T> java.lang.Class<T> loadClass(java.lang.String className)
public static <T> boolean hasClass(java.lang.Class<T> type, java.lang.ClassLoader classloader)
public static <T> java.lang.Class<T> loadClass(java.lang.String className, java.lang.ClassLoader classloader)