org.apache.commons.vfs2.impl
public class VFSClassLoader extends java.security.SecureClassLoader
Constructor and Description |
---|
VFSClassLoader(FileObject[] files,
FileSystemManager manager)
Constructors a new VFSClassLoader for the given files.
|
VFSClassLoader(FileObject[] files,
FileSystemManager manager,
java.lang.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,
java.lang.ClassLoader parent)
Constructors a new VFSClassLoader for the given file.
|
Modifier and Type | Method and Description |
---|---|
protected void |
copyPermissions(java.security.PermissionCollection src,
java.security.PermissionCollection dest)
Copies the permissions from src to dest.
|
protected java.lang.Class<?> |
findClass(java.lang.String name)
Finds and loads the class with the specified name from the search
path.
|
protected java.net.URL |
findResource(java.lang.String name)
Finds the resource with the specified name from the search path.
|
protected java.util.Enumeration<java.net.URL> |
findResources(java.lang.String name)
Returns an Enumeration of all the resources in the search path
with the specified name.
|
FileObject[] |
getFileObjects()
Provide access to the file objects this class loader represents.
|
protected java.security.PermissionCollection |
getPermissions(java.security.CodeSource cs)
Calls super.getPermissions both for the code source and also
adds the permissions granted to the parent layers.
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
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.FileSystemException
- if an error occurs.public VFSClassLoader(FileObject file, FileSystemManager manager, java.lang.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.FileSystemException
- if an error occurs.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.FileSystemException
- if an error occurs.public VFSClassLoader(FileObject[] files, FileSystemManager manager, java.lang.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.FileSystemException
- if an error occurs.public FileObject[] getFileObjects()
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
- if the class is not found.protected java.security.PermissionCollection getPermissions(java.security.CodeSource cs)
getPermissions
in class java.security.SecureClassLoader
cs
- the CodeSource.protected void copyPermissions(java.security.PermissionCollection src, java.security.PermissionCollection dest)
src
- The source PermissionCollection.dest
- The destination PermissionCollection.protected java.net.URL findResource(java.lang.String name)
findResource
in class java.lang.ClassLoader
name
- The resource name.protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
findResources
in class java.lang.ClassLoader
name
- The resources to find.Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.