|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.loader.DynamicClassLoader
public class DynamicClassLoader
Loads classes dynamically from a directory or jar/zip file being passed in.
Note:If you load individual classes the classes referring to that class are also automatically loaded as long as they are available in the classpath supplied or in the bootstrap of the JVM.
Constructor Summary | |
---|---|
DynamicClassLoader()
|
Method Summary | |
---|---|
static java.lang.Class[] |
findImplementation(java.lang.Class superOrInterface,
java.net.URL[] url)
find an implementation of an interface or
class in the classpath supplied by the URLs |
static java.lang.Class |
loadClass(java.lang.String name,
java.net.URL[] url)
load a specific class identified by it's fully qualified name from the passed URLs |
static java.lang.Class[] |
loadClasses(java.net.URL[] url)
load all the classes from the classpath supplied by the URLs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicClassLoader()
Method Detail |
---|
public static final java.lang.Class loadClass(java.lang.String name, java.net.URL[] url) throws java.lang.ClassNotFoundException
name
- String, the fully qualified class nameurl
- URL[], an array of URLs in which to find the class
ClassNotFoundException,
- thrown if the class being loaded cannot be found
in the supplied classpath or current ClassLoader if url was null.
java.lang.ClassNotFoundException
public static final java.lang.Class[] loadClasses(java.net.URL[] url) throws java.lang.ClassNotFoundException
url
- URL[], the paths to the classes or the jar file
ClassNotFoundException,
- thrown if a class cannot be loaded
from one of the locations supplied by the URLs.
java.lang.ClassNotFoundException
public static final java.lang.Class[] findImplementation(java.lang.Class superOrInterface, java.net.URL[] url) throws java.lang.ClassNotFoundException
interface
or
class
in the classpath supplied by the URLs
superOrInterface
- Class, the super class or interface
to find in the classpathurl
- URL[], the paths to the classes or the jar file
ClassNotFoundException,
- thrown if a class cannot be loaded
from one of the locations supplied by the URLs.
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |