|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
org.apache.commons.vfs.impl.VFSClassLoader
A class loader that can load classes and resources from a search path
VFS FileObjects refering both to folders and JAR files. Any FileObject
of type FileType.FILE is asumed to be a JAR and is opened
by creating a layered file system with the "jar" scheme.
TODO - Test this with signed Jars and a SecurityManager.
FileSystemManager.createFileSystem(java.lang.String, org.apache.commons.vfs.FileObject)| Constructor Summary | |
VFSClassLoader(FileObject[] files,
FileSystemManager manager)
Constructors a new VFSClassLoader for the given files. |
|
VFSClassLoader(FileObject[] files,
FileSystemManager manager,
ClassLoader parent)
Constructors a new VFSClassLoader for the given FileObjects. |
|
VFSClassLoader(FileObject file,
FileSystemManager manager)
Constructors a new VFSClassLoader for the given file. |
|
VFSClassLoader(FileObject file,
FileSystemManager manager,
ClassLoader parent)
Constructors a new VFSClassLoader for the given file. |
|
| Method Summary | |
protected void |
copyPermissions(PermissionCollection src,
PermissionCollection dest)
Copies the permissions from src to dest. |
protected Class |
findClass(String name)
Finds and loads the class with the specified name from the search path. |
protected URL |
findResource(String name)
Finds the resource with the specified name from the search path. |
protected Enumeration |
findResources(String name)
Returns an Enumeration of all the resources in the search path with the specified name. |
protected PermissionCollection |
getPermissions(CodeSource cs)
Calls super.getPermissions both for the code source and also adds the permissions granted to the parent layers. |
| Methods inherited from class java.security.SecureClassLoader |
defineClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public VFSClassLoader(FileObject file,
FileSystemManager manager)
throws FileSystemException
file - the file to load the classes and resources from.manager - the FileManager to use when trying create a layered Jar file
system.
public VFSClassLoader(FileObject file,
FileSystemManager manager,
ClassLoader parent)
throws FileSystemException
file - the file to load the classes and resources from.manager - the FileManager to use when trying create a layered Jar file
system.parent - the parent class loader for delegation.
public VFSClassLoader(FileObject[] files,
FileSystemManager manager)
throws FileSystemException
files - the files to load the classes and resources from.manager - the FileManager to use when trying create a layered Jar file
system.
public VFSClassLoader(FileObject[] files,
FileSystemManager manager,
ClassLoader parent)
throws FileSystemException
files - the FileObjects to load the classes and resources from.manager - the FileManager to use when trying create a layered Jar file
system.parent - the parent class loader for delegation.| Method Detail |
protected Class findClass(String name)
throws ClassNotFoundException
ClassNotFoundException - if the class is not found.protected PermissionCollection getPermissions(CodeSource cs)
protected void copyPermissions(PermissionCollection src,
PermissionCollection dest)
protected URL findResource(String name)
protected Enumeration findResources(String name)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||