public class FilteredClassRealm extends ClassRealm
ClassRealm but only exposing some resources of the underlying URL.
Only supposed to be called from ClassWorld.| Constructor and Description |
|---|
FilteredClassRealm(Predicate<String> filter,
ClassWorld world,
String id,
ClassLoader baseClassLoader)
Creates a new class realm.
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
findClassInternal(String name) |
URL |
findResource(String name) |
Enumeration<URL> |
findResources(String name) |
addURL, createChildRealm, display, display, findClass, findClass, getClassLoadingLock, getId, getImportClassLoader, getImportRealms, getParentClassLoader, getParentRealm, getResource, getResources, getStrategy, getWorld, importFrom, importFrom, importFromParent, loadClass, loadClass, loadClassFromImport, loadClassFromParent, loadClassFromSelf, loadResourceFromImport, loadResourceFromParent, loadResourceFromSelf, loadResourcesFromImport, loadResourcesFromParent, loadResourcesFromSelf, setParentClassLoader, setParentRealm, toStringclose, definePackage, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic FilteredClassRealm(Predicate<String> filter, ClassWorld world, String id, ClassLoader baseClassLoader)
filter - a predicate to apply to each resource name to determine if it should be loaded through this class loaderworld - The class world this realm belongs to, must not be null.id - The identifier for this realm, must not be null.baseClassLoader - The base class loader for this realm, may be null to use the bootstrap class
loader.protected Class<?> findClassInternal(String name) throws ClassNotFoundException
findClassInternal in class ClassRealmClassNotFoundExceptionpublic URL findResource(String name)
findResource in class ClassRealmpublic Enumeration<URL> findResources(String name) throws IOException
findResources in class ClassRealmIOExceptionCopyright © 2002–2022 Codehaus Plexus. All rights reserved.