| java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader
URLClassLoader | public class URLClassLoader extends SecureClassLoader (Code) | | 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.
|
Inner Class :static class IndexFile | |
Inner Class :class URLHandler | |
Inner Class :class URLJarHandler extends URLHandler | |
Inner Class :class URLFileHandler extends URLHandler | |
URLClassLoader | public URLClassLoader(URL[] urls)(Code) | | 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.
Parameters: urls - the URLs to search throws: SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders |
URLClassLoader | public URLClassLoader(URL[] urls, ClassLoader parent)(Code) | | 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.
Parameters: urls - the URLs to search Parameters: parent - the ClassLoader to assign as this loader's parent. throws: SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders |
URLClassLoader | public URLClassLoader(URL[] searchUrls, ClassLoader parent, URLStreamHandlerFactory factory)(Code) | | 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.
Parameters: searchUrls - java.net.URL[] the URLs that will be searched in the orderthey were specified for resource Parameters: parent - ClassLoader the ClassLoader name of the resource to find. Parameters: factory - java.net.URLStreamHandlerFactory the factory that will used tocreate stream (protocol) handlers throws: SecurityException - if a security manager exists and its checkCreateClassLoadermethod doesn't allow creation of new ClassLoaders |
addURL | protected void addURL(URL url)(Code) | | Adds the specified URL to the search list.
Parameters: url - java.net.URL the new URL |
definePackage | protected Package definePackage(String packageName, Manifest manifest, URL url) throws IllegalArgumentException(Code) | | Define a new Package using information extracted from the specified
Manifest.
Parameters: packageName - The name of the package Parameters: manifest - The Manifest for the Package Parameters: url - The code source for the Package The Package created throws: IllegalArgumentException - if the Package already exists |
findResource | public URL findResource(String name)(Code) | | Answers a URL referencing the specified resource or null if no resource
could be found.
Parameters: name - java.lang.String the name of the requested resource URL URL for the resource. |
findResourceImpl | URL findResourceImpl(String resName)(Code) | | Answers a URL among the given ones referencing the specified resource or
null if no resource could be found.
Parameters: resName - java.lang.String the name of the requested resource URL URL for the resource. |
findResources | public Enumeration<URL> findResources(String name) throws IOException(Code) | | Answers an enumeration of URLs that contain the specified resource.
Parameters: name - java.lang.String the name of the requested resource Enumeration the enumeration of URLs that contain the specifiedresource. throws: IOException - thrown if an IO Exception occurs while attempting to connect |
getHandler | URLHandler getHandler(int num)(Code) | | |
getPermissions | protected PermissionCollection getPermissions(CodeSource codesource)(Code) | | Answers 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.
Parameters: codesource - CodeSource PermissionCollection |
getURLs | public URL[] getURLs()(Code) | | Answers the search list of this URLClassLoader
java.net.URL[] |
newInstance | public static URLClassLoader newInstance(URL[] urls)(Code) | | Answers an instance of URLClassLoader .
loadClass() of the new instance will call the
SecurityManager's checkPackageAccess() before loading a
class.
Parameters: urls - java.net.URL[] a list of URLs that is passed to the newURLClassloader java.net.URLClassLoader the new instance ofURLClassLoader |
newInstance | public static URLClassLoader newInstance(URL[] urls, ClassLoader parentCl)(Code) | | Answers an instance of URLClassLoader .
loadClass() of the new instance will call security
manager's checkPackageAccess() before loading a class.
Parameters: urls - URL[] the list of URLs that is passed to the newURLClassloader Parameters: parentCl - ClassLoader the parent class loader that is passed tothe new URLClassloader URLClassLoader the new instance of URLClassLoader |
Methods inherited from java.lang.ClassLoader | public void clearAssertionStatus()(Code)(Java Doc) final protected Class> defineClass(byte[] data, int offset, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] data, int offset, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) final protected synchronized Class> defineClass(String name, byte[] data, int offset, int len, ProtectionDomain domain) throws ClassFormatError(Code)(Java Doc) protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException(Code)(Java Doc) protected Class> findClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected String findLibrary(String name)(Code)(Java Doc) final native protected Class> findLoadedClass(String name)(Code)(Java Doc) protected URL findResource(String name)(Code)(Java Doc) protected Enumeration<URL> findResources(String name) throws IOException(Code)(Java Doc) final protected Class> findSystemClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected Package getPackage(String name)(Code)(Java Doc) protected Package[] getPackages()(Code)(Java Doc) final public ClassLoader getParent()(Code)(Java Doc) public URL getResource(String name)(Code)(Java Doc) public InputStream getResourceAsStream(String name)(Code)(Java Doc) public Enumeration<URL> getResources(String name) throws IOException(Code)(Java Doc) public static ClassLoader getSystemClassLoader()(Code)(Java Doc) public static URL getSystemResource(String name)(Code)(Java Doc) public static InputStream getSystemResourceAsStream(String name)(Code)(Java Doc) public static Enumeration<URL> getSystemResources(String name) throws IOException(Code)(Java Doc) public Class> loadClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected synchronized Class> loadClass(String name, boolean resolve) throws ClassNotFoundException(Code)(Java Doc) final protected void resolveClass(Class> clazz)(Code)(Java Doc) public void setClassAssertionStatus(String name, boolean flag)(Code)(Java Doc) public void setDefaultAssertionStatus(boolean flag)(Code)(Java Doc) public void setPackageAssertionStatus(String name, boolean flag)(Code)(Java Doc) final protected void setSigners(Class> clazz, Object[] signers)(Code)(Java Doc)
|
|
|