|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ClassLoader
org.formaria.resource.RemoteClassLoader
public class RemoteClassLoader
Used to locate project files. 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) Formaria Ltd., 2008
$Revision: 2.3 $
| Field Summary | |
|---|---|
protected java.net.URI[] |
uri
the URIs that are searched |
| Constructor Summary | |
|---|---|
RemoteClassLoader(Project project)
Create a new class loader. |
|
| Method Summary | |
|---|---|
java.lang.Class |
findClass(java.lang.String className)
Finds the specified class. |
java.lang.Class |
findClass(java.lang.String className,
boolean resolveIt)
Overrides the method from ClassLoader. |
java.net.URL |
findResource(java.lang.String fileName)
Overrides the Classloader method and searches for the resource file specifies by the parameter fileName. |
java.io.InputStream |
getResourceAsStream(java.lang.String fileName)
Overrides the Classloader method and searches for the resource file specifies by the parameter fileName. |
boolean |
setSources(java.lang.String[] projectUris)
Set the URIs for loading files |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.net.URI[] uri
| Constructor Detail |
|---|
public RemoteClassLoader(Project project)
the - owner project| Method Detail |
|---|
public boolean setSources(java.lang.String[] projectUris)
setSources in interface IResourceLoaderprojectUris - The String array of URLs for inclusion in the search.
public java.io.InputStream getResourceAsStream(java.lang.String fileName)
getResourceAsStream in class java.lang.ClassLoaderfileName - The name of the file to be found.
public java.net.URL findResource(java.lang.String fileName)
findResource in class java.lang.ClassLoaderfileName - The name of the file to be found.
public java.lang.Class findClass(java.lang.String className)
throws java.lang.ClassNotFoundException
loadClass
method after checking the parent class loader for the requested class.
The default implementation throws ClassNotFoundException.
findClass in class java.lang.ClassLoaderclassName - the class to locate
Class object
java.lang.ClassNotFoundException - if the class could not be found
public java.lang.Class findClass(java.lang.String className,
boolean resolveIt)
throws java.lang.ClassNotFoundException
className - The name of the class we are being asked to findresolveIt - Simply forward the value passed in
java.lang.ClassNotFoundException - pronlems...
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||