| java.lang.Object java.lang.ClassLoader net.xoetrope.optional.resources.XRemoteClassLoader
XRemoteClassLoader | public class XRemoteClassLoader extends ClassLoader implements XResourceLoader(Code) | | Used to locate project files. This classloader is used in the XEditorResourceManager and is initialised when
a project is created or opened. It searches for files within the paths
specified in the paths array.
The paths/URIs can be specified in the startup file as follows:
NumRemoteClassLoaderPaths=2
RemoteClassLoaderPath1=http://localhost:8080/
RemoteClassLoaderPath2=http://localhost:8080/myresources/
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
$Revision: 1.4 $
|
Field Summary | |
protected URI[] | uri |
Method Summary | |
public Class | findClass(String className) Finds the specified class. | public synchronized Class | findClass(String className, boolean resolveIt) Overrides the method from ClassLoader. | public URL | findResource(String fileName) Overrides the Classloader method and searches for the resource file
specifies by the parameter fileName.
Parameters: fileName - The name of the file to be found. | public InputStream | getResourceAsStream(String fileName) Overrides the Classloader method and searches for the resource file
specifies by the parameter fileName.
Parameters: fileName - The name of the file to be found. | public boolean | setSources(String[] projectUris) |
XRemoteClassLoader | public XRemoteClassLoader()(Code) | | Create a new class loader. Initially no search path is set.
Parameters: classLoader - the super ClassLoader |
findClass | public Class findClass(String className) throws ClassNotFoundException(Code) | | Finds the specified class. This method should be overridden
by class loader implementations that follow the new delegation model
for loading classes, and will be called by the loadClass
method after checking the parent class loader for the requested class.
The default implementation throws ClassNotFoundException .
Parameters: name - the name of the class the resulting Class object exception: ClassNotFoundException - if the class could not be found |
findClass | public synchronized Class findClass(String className, boolean resolveIt) throws ClassNotFoundException(Code) | | Overrides the method from ClassLoader. This method is called auotmatically
if the system classloader cannot find the class it is looking for. We then
have the chance to find, load and return the class.
Parameters: className - The name of the class we are being asked to find Parameters: resolveIt - Simply forward the value passed in The newly created Class throws: ClassNotFoundException - |
findResource | public URL findResource(String fileName)(Code) | | Overrides the Classloader method and searches for the resource file
specifies by the parameter fileName.
Parameters: fileName - The name of the file to be found. A URL from the filename if found or null if notfound. |
getResourceAsStream | public InputStream getResourceAsStream(String fileName)(Code) | | Overrides the Classloader method and searches for the resource file
specifies by the parameter fileName.
Parameters: fileName - The name of the file to be found. An InputStream created by from the filename if found or null if notfound. |
setSources | public boolean setSources(String[] projectUris)(Code) | | Set the URIs for loading files
Parameters: projectUris - The String array of URLs for inclusion in the search. |
Methods inherited from java.lang.ClassLoader | public synchronized void clearAssertionStatus()(Code)(Java Doc) final protected Class> defineClass(byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, java.nio.ByteBuffer b, ProtectionDomain protectionDomain) 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 libname)(Code)(Java Doc) final 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> c)(Code)(Java Doc) public synchronized void setClassAssertionStatus(String className, boolean enabled)(Code)(Java Doc) public synchronized void setDefaultAssertionStatus(boolean enabled)(Code)(Java Doc) public synchronized void setPackageAssertionStatus(String packageName, boolean enabled)(Code)(Java Doc) final protected void setSigners(Class> c, Object[] signers)(Code)(Java Doc)
|
|
|