public class FilteredClassLoader extends ClassLoader
This utility is useful when trying to eliminate certain classes from a class loader force loading them through another class loader.
Constructor and Description |
---|
FilteredClassLoader(ClassLoader delegate,
String... filteredClassNames)
Creates a new filtered classloader.
|
Modifier and Type | Method and Description |
---|---|
protected Class<?> |
loadClass(String name,
boolean resolve) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public FilteredClassLoader(ClassLoader delegate, String... filteredClassNames)
delegate
- The class loader that is filtered by this classloader.filteredClassNames
- The class names to filter out.protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.