abbot.util
Class PathClassLoader

java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
abbot.util.PathClassLoader
- Direct Known Subclasses:
- PreloadingClassLoader
- public class PathClassLoader
- extends java.net.URLClassLoader
Provide a class loader that loads from a custom path. Similar to
sun.misc.Launcher$AppClassLoader (the usual application class loader),
except that it doesn't do the security checks that AppClassLoader does.
If path given is null, uses java.class.path.
| Nested classes inherited from class java.lang.ClassLoader |
|
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
classPath
private java.lang.String classPath
factory
private static final PathClassLoader.Factory factory
PathClassLoader
public PathClassLoader(java.lang.String path,
java.lang.ClassLoader parent)
- Create a class loader that loads classes from the given path.
getClassPath
public java.lang.String getClassPath()
loadClass
public java.lang.Class loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
- Description copied from class:
java.lang.ClassLoader
- Load a class using this ClassLoader or its parent, possibly resolving
it as well using
resolveClass(). It first tries to find
out if the class has already been loaded through this classloader by
calling findLoadedClass(). Then it calls
loadClass() on the parent classloader (or when there is
no parent it uses the VM bootclassloader). If the class is still
not loaded it tries to create a new class by calling
findClass(). Finally when resolve is
true it also calls resolveClass() on the
newly loaded class.
Subclasses should not override this method but should override
findClass() which is called by this method.
getURLs
static java.net.URL[] getURLs(java.lang.String p,
java.lang.String separators)
convertPathToFiles
static java.io.File[] convertPathToFiles(java.lang.String path,
java.lang.String seps)
convertPathToFiles
static java.io.File[] convertPathToFiles(java.lang.String path,
java.lang.String seps,
boolean fixDrives)