Package hudson
Class PluginManager.UberClassLoader
java.lang.Object
java.lang.ClassLoader
hudson.util.DelegatingClassLoader
hudson.util.CachingClassLoader
hudson.PluginManager.UberClassLoader
- Enclosing class:
- PluginManager
ClassLoader that can see all plugins.- 
Constructor SummaryConstructorsConstructorDescriptionUberClassLoader(List<PluginWrapper> activePlugins) The servlet container'sClassLoader(the parent of Jenkins core) is parallel-capable and maintains its own growingMapofClassLoader.getClassLoadingLock(java.lang.String)objects per class name for every load attempt (including misses), and we cannot override this behavior.
- 
Method SummaryModifier and TypeMethodDescriptionprotected Class<?> protected URLfindResource(String name) protected Enumeration<URL> findResources(String name) booleanisPluginJar(URL jarUrl) protected Class<?> Parent-first delegation without synchronizing onClassLoader.getClassLoadingLock(String).toString()Methods inherited from class hudson.util.CachingClassLoaderclearCacheMissesMethods inherited from class java.lang.ClassLoaderclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
- 
Constructor Details- 
UberClassLoaderThe servlet container'sClassLoader(the parent of Jenkins core) is parallel-capable and maintains its own growingMapofClassLoader.getClassLoadingLock(java.lang.String)objects per class name for every load attempt (including misses), and we cannot override this behavior. Wrap the servlet containerClassLoaderinExistenceCheckingClassLoaderto avoid callingClassLoader.getParent()'sClassLoader.loadClass(String, boolean)at all for misses by first checking if the resource exists. If the resource does not exist, we immediately throwClassNotFoundException. As a result, the servlet container'sClassLoaderis never asked to try and fail, and it never creates/retains lock objects for those misses.
 
- 
- 
Method Details- 
loadClassDescription copied from class:DelegatingClassLoaderParent-first delegation without synchronizing onClassLoader.getClassLoadingLock(String). This prevents creation/retention of per-name lock objects in a loader that does not define classes. The defining loader downstream still serializes class definition as required.- Overrides:
- loadClassin class- CachingClassLoader
- Parameters:
- name- The binary name of the class
- resolve- If- truethen resolve the class
- Returns:
- The resulting Classobject
- Throws:
- ClassNotFoundException- If the class could not be found
 
- 
findClass- Overrides:
- findClassin class- ClassLoader
- Throws:
- ClassNotFoundException
 
- 
findResource- Overrides:
- findResourcein class- ClassLoader
 
- 
findResources- Overrides:
- findResourcesin class- ClassLoader
- Throws:
- IOException
 
- 
toString
- 
isPluginJar@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isPluginJar(URL jarUrl) 
 
-