Package jenkins.util
Class URLClassLoader2
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
jenkins.util.URLClassLoader2
- All Implemented Interfaces:
Closeable
,AutoCloseable
,JenkinsClassLoader
- Direct Known Subclasses:
PluginFirstClassLoader2
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class URLClassLoader2
extends URLClassLoader
implements JenkinsClassLoader
URLClassLoader
with loosened visibility for use with ClassLoaderReflectionToolkit
.-
Constructor Summary
ConstructorDescriptionURLClassLoader2
(String name, URL[] urls) Create a newURLClassLoader2
with the given name and URLS and theClassLoader.getSystemClassLoader()
as its parent.URLClassLoader2
(String name, URL[] urls, ClassLoader parent) Create a newURLClassLoader2
with the given name, URLS parent.URLClassLoader2
(URL[] urls) Deprecated.URLClassLoader2
(URL[] urls, ClassLoader parent) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Class<?>
Public version ofClassLoader.findClass(String)
Class<?>
findLoadedClass2
(String name) Public version ofClassLoader.findLoadedClass(String)
getClassLoadingLock
(String className) Public version ofClassLoader.getClassLoadingLock(String)
Methods inherited from class java.net.URLClassLoader
close, definePackage, findResource, findResources, getPermissions, getResourceAsStream, 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, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jenkins.util.JenkinsClassLoader
findResource, findResources
-
Constructor Details
-
URLClassLoader2
Deprecated. -
URLClassLoader2
Deprecated. -
URLClassLoader2
Create a newURLClassLoader2
with the given name and URLS and theClassLoader.getSystemClassLoader()
as its parent.- Parameters:
name
- name of this classloader.urls
- the list of URLS to find classes in.- Since:
- 2.459
-
URLClassLoader2
Create a newURLClassLoader2
with the given name, URLS parent.- Parameters:
name
- name of this classloader.urls
- the list of URLS to find classes in.parent
- the parent to search for classes before we look in theurls
- Since:
- 2.459
-
-
Method Details
-
addURL
- Overrides:
addURL
in classURLClassLoader
-
findClass
Description copied from interface:JenkinsClassLoader
Public version ofClassLoader.findClass(String)
- Specified by:
findClass
in interfaceJenkinsClassLoader
- Overrides:
findClass
in classURLClassLoader
- Throws:
ClassNotFoundException
-
findLoadedClass2
Description copied from interface:JenkinsClassLoader
Public version ofClassLoader.findLoadedClass(String)
- Specified by:
findLoadedClass2
in interfaceJenkinsClassLoader
-
getClassLoadingLock
Description copied from interface:JenkinsClassLoader
Public version ofClassLoader.getClassLoadingLock(String)
- Specified by:
getClassLoadingLock
in interfaceJenkinsClassLoader
- Overrides:
getClassLoadingLock
in classClassLoader
-
URLClassLoader2(String, URL[])