| java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader org.apache.commons.vfs.impl.VFSClassLoader
VFSClassLoader | public class VFSClassLoader extends SecureClassLoader (Code) | | 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.
author: Brian Olsen version: $Revision: 520101 $ $Date: 2007-03-19 13:59:05 -0700 (Mon, 19 Mar 2007) $ See Also: FileSystemManager.createFileSystem |
VFSClassLoader | public VFSClassLoader(FileObject file, FileSystemManager manager) throws FileSystemException(Code) | | Constructors a new VFSClassLoader for the given file.
Parameters: file - the file to load the classes and resources from. Parameters: manager - the FileManager to use when trying create a layered Jar filesystem. |
VFSClassLoader | public VFSClassLoader(FileObject file, FileSystemManager manager, ClassLoader parent) throws FileSystemException(Code) | | Constructors a new VFSClassLoader for the given file.
Parameters: file - the file to load the classes and resources from. Parameters: manager - the FileManager to use when trying create a layered Jar filesystem. Parameters: parent - the parent class loader for delegation. |
VFSClassLoader | public VFSClassLoader(FileObject[] files, FileSystemManager manager) throws FileSystemException(Code) | | Constructors a new VFSClassLoader for the given files. The files will
be searched in the order specified.
Parameters: files - the files to load the classes and resources from. Parameters: manager - the FileManager to use when trying create a layered Jar filesystem. |
VFSClassLoader | public VFSClassLoader(FileObject[] files, FileSystemManager manager, ClassLoader parent) throws FileSystemException(Code) | | Constructors a new VFSClassLoader for the given FileObjects.
The FileObjects will be searched in the order specified.
Parameters: files - the FileObjects to load the classes and resources from. Parameters: manager - the FileManager to use when trying create a layered Jar filesystem. Parameters: parent - the parent class loader for delegation. |
findResource | protected URL findResource(String name)(Code) | | Finds the resource with the specified name from the search path.
This returns null if the resource is not found.
|
findResources | protected Enumeration findResources(String name)(Code) | | Returns an Enumeration of all the resources in the search path
with the specified name.
TODO - Implement this.
|
getFileObjects | public FileObject[] getFileObjects()(Code) | | provide access to the file objects this class loader represents
|
getPermissions | protected PermissionCollection getPermissions(CodeSource cs)(Code) | | Calls super.getPermissions both for the code source and also
adds the permissions granted to the parent layers.
|
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)
|
|
|