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(Set<File> jarsAndDirs, ClassLoader parent)
Initializes a new instance by the jarsAndDirs, filtered and ordered by file names.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
-
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(Set<File> jarsAndDirs, ClassLoader parent)
Initializes a new instance by the jarsAndDirs, filtered and ordered by file names.- Parameters:
jarsAndDirs
-parent
- - parent has higher priority.
-
DirectoryClassLoader
public DirectoryClassLoader(File dir, ClassLoader parent)
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
-
-