public class SecureFilteringClassLoader extends ClassLoader
| Constructor and Description |
|---|
SecureFilteringClassLoader(ClassLoader delegate)
Sets up the securing filtering class loader, using the default allowed and forbidden classes.
|
SecureFilteringClassLoader(Set<String> allowedClasses,
Set<String> forbiddenClasses,
ClassLoader delegate)
Sets up the secure filtering class loader
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
findClass(String name) |
Class<?> |
loadClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic SecureFilteringClassLoader(ClassLoader delegate)
delegate - the class loader we delegate to if the filtering was not applied.public SecureFilteringClassLoader(Set<String> allowedClasses, Set<String> forbiddenClasses, ClassLoader delegate)
allowedClasses - the list of allowed FQN class names, or if this filtering is to be deactivated, pass null.
if you want to allow no class, pass an empty hashsetforbiddenClasses - the list of forbidden FQN class names, or if this filtering is to be deactivated, pass null or an empty setdelegate - the class loader we delegate to if the filtering was not applied.public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionCopyright © 2014–2023 Apache Software Foundation. All rights reserved.