| java.lang.Object java.lang.ClassLoader net.xoetrope.builder.editor.XEditorClassLoader
XEditorClassLoader | public class XEditorClassLoader 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.
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
$Revision: 1.7 $
|
Method Summary | |
public Class | findClass(String className) | 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[] projectPaths) Set the paths for loading files
Parameters: projectPaths - The String array of paths for inclusion in the search. |
XEditorClassLoader | public XEditorClassLoader(ClassLoader classLoader)(Code) | | Create a new class loader. Initially no search path is set.
Parameters: classLoader - the super ClassLoader |
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[] projectPaths)(Code) | | Set the paths for loading files
Parameters: projectPaths - The String array of paths for inclusion in the search. true to indicate that the sources are setup, false to indicate some failure |
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)
|
|
|