Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

abbot.util
Class PathClassLoader  view PathClassLoader download PathClassLoader.java

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byabbot.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 Class Summary
private static class PathClassLoader.Factory
          Taken from sun.misc.Launcher.
 
Nested classes inherited from class java.net.URLClassLoader
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
private  java.lang.String classPath
           
private static PathClassLoader.Factory factory
           
 
Fields inherited from class java.net.URLClassLoader
 
Fields inherited from class java.security.SecureClassLoader
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
PathClassLoader(java.lang.String path, java.lang.ClassLoader parent)
          Create a class loader that loads classes from the given path.
 
Method Summary
(package private) static java.io.File[] convertPathToFiles(java.lang.String path, java.lang.String seps)
           
(package private) static java.io.File[] convertPathToFiles(java.lang.String path, java.lang.String seps, boolean fixDrives)
           
 java.lang.String getClassPath()
           
(package private) static java.net.URL[] getURLs(java.lang.String p, java.lang.String separators)
           
 java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load a class using this ClassLoader or its parent, possibly resolving it as well using resolveClass().
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance, toString
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

classPath

private java.lang.String classPath

factory

private static final PathClassLoader.Factory factory
Constructor Detail

PathClassLoader

public PathClassLoader(java.lang.String path,
                       java.lang.ClassLoader parent)
Create a class loader that loads classes from the given path.

Method Detail

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)