public class ShrinkWrapClassLoader extends URLClassLoader implements Closeable
close()
to free resources.Constructor and Description |
---|
ShrinkWrapClassLoader(Archive<?>... archives)
Constructs a new ShrinkWrapClassLoader for the specified
Archive s using the default delegation parent
ClassLoader . |
ShrinkWrapClassLoader(ClassLoader parent,
Archive<?>... archives)
Constructs a new ShrinkWrapClassLoader for the given
Archive s. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
addURL, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, 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, setSigners
public ShrinkWrapClassLoader(Archive<?>... archives)
Archive
s using the default delegation parent
ClassLoader
. The Archive
s will be searched in the order specified for classes and resources
after first searching in the parent class loader.archives
- the Archive
s from which to load classes and resourcespublic ShrinkWrapClassLoader(ClassLoader parent, Archive<?>... archives)
Archive
s. The Archive
s 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 delegationarchives
- the Archive
s from which to load classes and resourcespublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class URLClassLoader
IOException
Copyright © 2016 JBoss by Red Hat. All rights reserved.