Package com.sun.enterprise.admin.cli
Class DirectoryClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.glassfish.common.util.GlassfishUrlClassLoader
com.sun.enterprise.admin.cli.DirectoryClassLoader
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DirectoryClassLoader
extends org.glassfish.common.util.GlassfishUrlClassLoader
A class loader that loads classes from all jar files in a specified directory.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryClassLoader(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
Methods inherited from class org.glassfish.common.util.GlassfishUrlClassLoader
close, definePackage, findClass, findResource, findResources, getResourceAsStream, loadClass, toStringMethods inherited from class java.net.URLClassLoader
addURL, definePackage, getPermissions, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
DirectoryClassLoader
Initializes a new instance by the jarsAndDirs, filtered and ordered by file names.- Parameters:
jarsAndDirs-parent- - parent has higher priority.
-
DirectoryClassLoader
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
-