public class ShrinkWrapClassLoader extends URLClassLoader implements Closeable
close() to free resources.| Constructor and Description |
|---|
ShrinkWrapClassLoader(Archive<?>... archives)
Constructs a new ShrinkWrapClassLoader for the specified
Archives using the default delegation parent
ClassLoader. |
ShrinkWrapClassLoader(ClassLoader parent,
Archive<?>... archives)
Constructs a new ShrinkWrapClassLoader for the given
Archives. |
ShrinkWrapClassLoader(ClassLoader parent,
String classPrefix,
Archive<?>... archives)
Constructs a new ShrinkWrapClassLoader for the given
Archives. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
addURL, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic ShrinkWrapClassLoader(Archive<?>... archives)
Archives using the default delegation parent
ClassLoader. The Archives will be searched in the order specified for classes and resources
after first searching in the parent class loader. Will assume classes are stored relative to the root of the archive.archives - the Archives from which to load classes and resourcespublic ShrinkWrapClassLoader(ClassLoader parent, Archive<?>... archives)
Archives. The Archives will be searched in
the order specified for classes and resources after first searching in the specified parent class loader.
Will assume classes are stored relative to the root of the archive.parent - the parent class loader for delegationarchives - the Archives from which to load classes and resourcespublic ShrinkWrapClassLoader(ClassLoader parent, String classPrefix, Archive<?>... archives)
Archives. The Archives will be searched in
the order specified for classes and resources after first searching in the specified parent class loader.parent - the parent class loader for delegationclassPrefix - The location under which classes are located in the archive. For instance,
WebArchive types store their classes under WEB-INF/classes. If
null, assumes the rootarchives - the Archives from which to load classes and resourcespublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class URLClassLoaderCopyright © 2024 JBoss by Red Hat. All rights reserved.