| java.lang.Object | |||
| ↳ | java.lang.ClassLoader | ||
| ↳ | java.security.SecureClassLoader | ||
| ↳ | java.net.URLClassLoader | ||
This class loader is responsible for loading classes and resources from a
list of URLs which can refer to either directories or JAR files. Classes
loaded by this URLClassLoader are granted permission to access
the URLs contained in the URL search list.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of this class.
| |||||||||||
Constructs a new instance of this class.
| |||||||||||
Constructs a new instance of this class.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a URL referencing the specified resource or null if no resource
could be found.
| |||||||||||
Returns an enumeration of URLs that contain the specified resource.
| |||||||||||
Returns the search list of this URLClassLoader
| |||||||||||
Returns an instance of
URLClassLoader. | |||||||||||
Returns an instance of
URLClassLoader. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds the specified URL to the search list.
| |||||||||||
Define a new Package using information extracted from the specified
Manifest.
| |||||||||||
Locates and loads the specified class, searching this URLClassLoader's
list of URLS.
| |||||||||||
Returns the permissions for the given code source.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.security.SecureClassLoader
| |||||||||||
From class java.lang.ClassLoader
| |||||||||||
From class java.lang.Object
| |||||||||||
Constructs a new instance of this class. The newly created instance will have the system ClassLoader as its parent. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
| urls | the URLs to search |
|---|
| SecurityException | if a security manager exists and its checkCreateClassLoader method doesn't allow creation of new ClassLoaders |
|---|
Constructs a new instance of this class. The newly created instance will have the specified ClassLoader as its parent. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
| urls | the URLs to search |
|---|---|
| parent | the ClassLoader to assign as this loader's parent. |
| SecurityException | if a security manager exists and its checkCreateClassLoader method doesn't allow creation of new ClassLoaders |
|---|
Constructs a new instance of this class. The newly created instance will have the specified ClassLoader as its parent and use the specified factory to create stream handlers. URLs that end with "/" are assumed to be directories, otherwise they are assumed to be Jar files.
| searchUrls | java.net.URL[] the URLs that will be searched in the order they were specified for resource |
|---|---|
| parent | ClassLoader the ClassLoader name of the resource to find. |
| factory | java.net.URLStreamHandlerFactory the factory that will used to create stream (protocol) handlers |
| SecurityException | if a security manager exists and its checkCreateClassLoader method doesn't allow creation of new ClassLoaders |
|---|
Returns a URL referencing the specified resource or null if no resource could be found.
| name | java.lang.String the name of the requested resource |
|---|
Returns an enumeration of URLs that contain the specified resource.
| name | java.lang.String the name of the requested resource |
|---|
| IOException | thrown if an IO Exception occurs while attempting to connect |
|---|
Returns the search list of this URLClassLoader
Returns an instance of URLClassLoader.
loadClass() of the new instance will call security
manager's checkPackageAccess() before loading a class.
| urls | URL[] the list of URLs that is passed to the new
URLClassloader |
|---|---|
| parentCl | ClassLoader the parent class loader that is passed to the new
URLClassloader
|
URLClassLoaderReturns an instance of URLClassLoader.
loadClass() of the new instance will call the
SecurityManager's checkPackageAccess() before loading a
class.
| urls | java.net.URL[] a list of URLs that is passed to the new URLClassloader |
|---|
URLClassLoaderAdds the specified URL to the search list.
| url | java.net.URL the new URL |
|---|
Define a new Package using information extracted from the specified Manifest.
| packageName | The name of the package |
|---|---|
| manifest | The Manifest for the Package |
| url | The code source for the Package |
| IllegalArgumentException | if the Package already exists |
|---|
Locates and loads the specified class, searching this URLClassLoader's list of URLS.
| clsName | String the name of the class. |
|---|
| ClassNotFoundException | if the class cannot be loaded |
|---|
Returns the permissions for the given code source. First this method
retrieves the permissions from the system policy. If the protocol is
"file:/" then a new permission, FilePermission, granting
the read permission to the file is added to the permission collection.
Otherwise, connecting to and accepting connections from the URL is
granted.
| codesource | CodeSource |
|---|