Package com.sun.enterprise.admin.cli
Class DirectoryClassLoader
- java.lang.Object
-
- java.lang.ClassLoader
-
- java.security.SecureClassLoader
-
- java.net.URLClassLoader
-
- com.sun.enterprise.admin.cli.DirectoryClassLoader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DirectoryClassLoader extends URLClassLoader
A class loader that loads classes from all jar files in a specified directory.
-
-
Constructor Summary
Constructors Constructor Description 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.DirectoryClassLoader(Set<File> jarsAndDirs, ClassLoader parent)
-
Method Summary
-
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, 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, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
-
-
-
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 fromparent- the parent class loader- Throws:
IOException- if the directory can't be accessed
-
DirectoryClassLoader
public DirectoryClassLoader(Set<File> jarsAndDirs, ClassLoader parent) throws IOException
- Throws:
IOException
-
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 fromparent- the parent class loader- Throws:
IOException- if the directory can't be accessed
-
-