abbot.util
Class PathClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byabbot.util.PathClassLoader
Direct Known Subclasses:
NonDelegatingClassLoader

public class PathClassLoader
extends 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
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
PathClassLoader(String path)
          Create a class loader that loads classes from the given path.
PathClassLoader(String path, ClassLoader parent)
          Create a class loader that loads classes from the given path.
 
Method Summary
static String[] convertPathToFilenames(String path)
          Returns an array of filenames (including path).
(package private) static String[] convertPathToFilenames(String path, String seps)
           
static File[] convertPathToFiles(String path, String seps)
          Convert the given path string into an array of File.
 String getClassPath()
           
(package private) static URL[] getURLs(String p, String separators)
          Returns an array of URLs based on the given classpath string.
protected  Class loadClass(String name, boolean resolve)
           
 String toString()
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, 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
 

Constructor Detail

PathClassLoader

public PathClassLoader(String path)
Create a class loader that loads classes from the given path.


PathClassLoader

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

Method Detail

getClassPath

public String getClassPath()

loadClass

protected Class loadClass(String name,
                          boolean resolve)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

getURLs

static URL[] getURLs(String p,
                     String separators)
Returns an array of URLs based on the given classpath string.


convertPathToFilenames

public static String[] convertPathToFilenames(String path)
Returns an array of filenames (including path).


convertPathToFiles

public static File[] convertPathToFiles(String path,
                                        String seps)
Convert the given path string into an array of File.


convertPathToFilenames

static String[] convertPathToFilenames(String path,
                                       String seps)

toString

public String toString()


Copyright © 2002-2004 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge