URLClassLoader

public class URLClassLoader extends SecureClassLoader

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. This version has been simplified, since iOS is prohibited from dynamically loading classes from bundles other than the main app bundle. No code was shared, just its public API.

Public Constructor Summary

URLClassLoader(URL[] urls)
Constructs a new URLClassLoader instance.
URLClassLoader(URL[] urls, ClassLoader parent)
Constructs a new URLClassLoader instance.
URLClassLoader(URL[] searchUrls, ClassLoader parent, URLStreamHandlerFactory factory)
Constructs a new URLClassLoader instance.

Public Method Summary

void
close()
Closes this classLoader, so it can't be used to load new classes or resources.
Enumeration<URL>
findResources(String name)
Returns all known URLs which point to the specified resource.
URL[]
getURLs()
Returns the search list of this URLClassLoader.
static URLClassLoader
newInstance(URL[] urls)
Returns a new URLClassLoader instance for the given URLs and the system ClassLoader as its parent.
static URLClassLoader
newInstance(URL[] urls, ClassLoader parentCl)
Returns a new URLClassLoader instance for the given URLs and the specified ClassLoader as its parent.

Protected Method Summary

void
addURL(URL url)
Adds the specified URL to the search list.

Inherited Method Summary