|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.rhq.enterprise.server.plugin.pc.RootServerPluginClassLoader
public class RootServerPluginClassLoader
This is the classloader that will be the parent to all plugin classloaders. It will be created such that it essentially hides a set of excluded classes which typically means this this root classloader (and its children plugin classloaders) will allow the following to be loaded:
| Constructor Summary | |
|---|---|
RootServerPluginClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.lang.String... classesToHideRegexStr)
Creates this classloader. |
|
| Method Summary | |
|---|---|
java.net.URL |
getResource(java.lang.String name)
|
protected java.lang.Class<?> |
loadClass(java.lang.String name,
boolean resolve)
|
| Methods inherited from class java.net.URLClassLoader |
|---|
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RootServerPluginClassLoader(java.net.URL[] urls,
java.lang.ClassLoader parent,
java.lang.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.
java.util.regex.PatternSyntaxException - if the given regex is invalid (see Pattern.compile(String))| Method Detail |
|---|
protected java.lang.Class<?> loadClass(java.lang.String name,
boolean resolve)
throws java.lang.ClassNotFoundException
loadClass in class java.lang.ClassLoaderjava.lang.ClassNotFoundExceptionpublic java.net.URL getResource(java.lang.String name)
getResource in class java.lang.ClassLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||