com.sun.enterprise.admin.cli
Class DirectoryClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by com.sun.enterprise.admin.cli.DirectoryClassLoader

public class DirectoryClassLoader
extends URLClassLoader

A class loader that loads classes from all jar files in a specified directory.


Constructor Summary
DirectoryClassLoader(File dir, ClassLoader parent)
          Create a DirectoryClassLoader to load from jar files in the specified directory, with the specified parent class loader.
DirectoryClassLoader(String dir, ClassLoader parent)
          Create a DirectoryClassLoader to load from jar files in the specified directory, with the specified parent class loader.
 
Method Summary
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, 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, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryClassLoader

public DirectoryClassLoader(String dir,
                            ClassLoader parent)
                     throws IOException
Create a DirectoryClassLoader to load from jar files in the specified directory, with the specified parent class loader.

Parameters:
dir - the directory of jar files to load from
parent - the parent class loader
Throws:
IOException - if the directory can't be accessed

DirectoryClassLoader

public DirectoryClassLoader(File dir,
                            ClassLoader parent)
                     throws IOException
Create a DirectoryClassLoader to load from jar files in the specified directory, with the specified parent class loader.

Parameters:
dir - the directory of jar files to load from
parent - the parent class loader
Throws:
IOException - if the directory can't be accessed


Copyright © 2012. All Rights Reserved.