public final class DynamicClassLoader
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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
|
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 classjava.lang.ClassNotFoundException - thrown if the class being loaded cannot be found
in the supplied classpath or current ClassLoader if url was null.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 filejava.lang.ClassNotFoundException - thrown if a class cannot be loaded
from one of the locations supplied by the URLs.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 URLssuperOrInterface - Class, the super class or interface
to find in the classpathurl - URL[], the paths to the classes or the jar filejava.lang.ClassNotFoundException - thrown if a class cannot be loaded
from one of the locations supplied by the URLs.