|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.util.ClassLoaderUtil
public class ClassLoaderUtil
Simple ClassLoader utility.
| Constructor Summary | |
|---|---|
ClassLoaderUtil()
|
|
| Method Summary | |
|---|---|
static ClassLoader |
createClassloader(File libDir,
ClassLoader cl)
Deprecated. removal candidate, never used |
static URLClassLoader |
createURLClassLoader(String dirPath)
Construct a URLClassLoader based on a canonical file location. |
static URLClassLoader |
createURLClassLoader(String location,
ClassLoader parent)
Construct a URLClassLoader based on a canonical file location. |
static Object |
load(String clazzName)
Load a class using the current {link Thread#getContextClassLoader} |
static Object |
load(String clazzName,
ClassLoader classLoader)
Load a class using the provided ClassLoader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassLoaderUtil()
| Method Detail |
|---|
public static ClassLoader createClassloader(File libDir,
ClassLoader cl)
throws IOException
libDir - Directory with jars.cl - the parent ClassLoader, or null if none.
URLClassLoader that can load classes from a directory that
contains jar and zip files.
IOException - I/O fail
public static URLClassLoader createURLClassLoader(String dirPath)
throws IOException
URLClassLoader based on a canonical file location.
dirPath - a canonical path location
URLClassLoader
IOException - I/O
MalformedURLException - Invalid URL
public static URLClassLoader createURLClassLoader(String location,
ClassLoader parent)
throws IOException
URLClassLoader based on a canonical file location.
location - a canonical path locationparent - ClassLoader to be used as parent for returned one.
URLClassLoader
IOException - I/O
MalformedURLException - Invalid URLpublic static Object load(String clazzName)
clazzName - The name of the class you want to load.
public static Object load(String clazzName,
ClassLoader classLoader)
ClassLoader
clazzName - The name of the class you want to load.classLoader - A classloader to use for loading a class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||