public class RootServerPluginClassLoader extends URLClassLoader
| Constructor and Description |
|---|
RootServerPluginClassLoader(URL[] urls,
ClassLoader parent,
String... classesToHideRegexStr)
Creates this classloader.
|
| Modifier and Type | Method and Description |
|---|---|
URL |
getResource(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic RootServerPluginClassLoader(URL[] urls, ClassLoader parent, String... classesToHideRegexStr)
classesToHideRegexStr is a regular expression to use to match against names
of classes to hide (i.e. not load). If a class that is to be loaded doesn't match the regex, it will be loaded
using parent-first semantics (i.e. it will first be searched in the parent classloader, and only if it isn't found
there will this classloader be checked for it). Otherwise, the class will be loaded using this classloader
only - the parent classloader will not be consulted so if this classloader does not have the class to be loaded, a
ClassCastException will be thrown.urls - URLs to jar files where classes can be loaded by this classloaderparent - the parent to this classloader, used when loading classes via parent-first semanticsclassesToHideRegexStr - regular expression(s) to use to match against names of classes to load.
if null or empty, no classes will be hidden, the parent will always
be consulted first to load the classes.PatternSyntaxException - if the given regex is invalid (see Pattern.compile(String))protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionpublic URL getResource(String name)
getResource in class ClassLoaderCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.