|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ClassLoader
com.mucommander.file.AbstractFileClassLoader
public class AbstractFileClassLoader
ClassLoader implementation capable of loading classes from instances of AbstractFile.
It's possible to modify this loader's classpath at runtime through the addFile(AbstractFile) method.
| Constructor Summary | |
|---|---|
AbstractFileClassLoader()
Creates a new AbstractFileClassLoader that uses the system classloader as a parent. |
|
AbstractFileClassLoader(java.lang.ClassLoader parent)
Creates a new AbstractFileClassLoader. |
|
| Method Summary | |
|---|---|
void |
addFile(AbstractFile file)
Adds the specified file to the class loader's classpath. |
boolean |
contains(AbstractFile file)
Returns true if this loader's classpath already contains the specified file. |
java.util.Iterator |
files()
Returns an iterator on all files in this loader's classpath. |
protected java.lang.Class |
findClass(java.lang.String name)
Tries to find and load the specified class. |
protected java.lang.String |
findLibrary(java.lang.String name)
Returns the absolute path of the requested library. |
protected java.net.URL |
findResource(java.lang.String name)
Tries to find the requested resource. |
protected java.util.Enumeration |
findResources(java.lang.String name)
Tries to find all the resources with the specified name. |
java.io.InputStream |
getResourceAsStream(java.lang.String name)
Returns an input stream on the requested resource. |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, 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 |
| Constructor Detail |
|---|
public AbstractFileClassLoader(java.lang.ClassLoader parent)
AbstractFileClassLoader.
parent - parent of the class loader.public AbstractFileClassLoader()
AbstractFileClassLoader that uses the system classloader as a parent.
| Method Detail |
|---|
public void addFile(AbstractFile file)
file to the class loader's classpath.
Note that the file will not be added if it's already in the classpath.
file - file to add the class loader's classpath.
java.lang.IllegalArgumentException - if file is not browsable.public java.util.Iterator files()
public boolean contains(AbstractFile file)
true if this loader's classpath already contains the specified file.
file - file to look for.
true if this loader's classpath already contains the specified file.public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream in class java.lang.ClassLoadername - name of the resource to open.
null if not found.protected java.net.URL findResource(java.lang.String name)
findResource in class java.lang.ClassLoadername - name of the resource to locate.
null otherwise.protected java.util.Enumeration findResources(java.lang.String name)
findResources in class java.lang.ClassLoadername - of the resources to find.
name.protected java.lang.String findLibrary(java.lang.String name)
findLibrary in class java.lang.ClassLoadername - name of the library to load.
null otheriwse.
protected java.lang.Class findClass(java.lang.String name)
throws java.lang.ClassNotFoundException
findClass in class java.lang.ClassLoadername - fully qualified name of the class to load.
Class if found, null otherwise.
java.lang.ClassNotFoundException - if the requested class was not found.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard