org.openide.execution
Class NbClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--java.security.SecureClassLoader
|
+--java.net.URLClassLoader
|
+--org.openide.execution.NbClassLoader
- public class NbClassLoader
- extends URLClassLoader
A class loader which is capable of loading classes from the Repository.
Classes loaded from file systems in the repository are handled by NbfsStreamHandlerFactory
.
Field Summary |
protected InputOutput |
inout
I/O for classes defined by this classloader. |
Constructor Summary |
NbClassLoader()
Create a new class loader retrieving classes from the core IDE as well as the Repository. |
NbClassLoader(FileSystem[] fileSystems)
Create a new class loader retrieving classes from the core IDE as well as specified file systems. |
NbClassLoader(FileSystem[] fileSystems,
ClassLoader parent)
Create a new class loader. |
NbClassLoader(InputOutput io)
Create a new class loader retrieving classes from the core IDE as well as the Repository,
and redirecting system I/O. |
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inout
protected InputOutput inout
- I/O for classes defined by this classloader. May be
null
.
NbClassLoader
public NbClassLoader()
- Create a new class loader retrieving classes from the core IDE as well as the Repository.
- See Also:
FileSystemCapability.EXECUTE
,
FileSystemCapability.fileSystems()
,
TopManager.systemClassLoader()
NbClassLoader
public NbClassLoader(InputOutput io)
- Create a new class loader retrieving classes from the core IDE as well as the Repository,
and redirecting system I/O.
- Parameters:
io
- an I/O tab in the Output Window- See Also:
Repository.getFileSystems()
,
TopManager.systemClassLoader()
NbClassLoader
public NbClassLoader(FileSystem[] fileSystems)
- Create a new class loader retrieving classes from the core IDE as well as specified file systems.
- Parameters:
fileSystems
- file systems to load classes from- See Also:
TopManager.systemClassLoader()
NbClassLoader
public NbClassLoader(FileSystem[] fileSystems,
ClassLoader parent)
- Create a new class loader.
- Parameters:
fileSystems
- file systems to load classes fromparent
- fallback class loader
getResource
public URL getResource(String name)
- Create a URL to a resource specified by name.
Same behavior as in the super method, but handles names beginning with a slash.
- Overrides:
getResource
in class ClassLoader
- Parameters:
name
- resource name- Returns:
- URL to that resource or
null
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Overrides:
findClass
in class URLClassLoader
setDefaultPermissions
public void setDefaultPermissions(PermissionCollection defaultPerms)
- Sets a PermissionsCollectio which will be used
for ProtectionDomain of newly created classes.
- Parameters:
defaultPerms
-
getPermissions
protected final PermissionCollection getPermissions(CodeSource cs)
- Overrides:
getPermissions
in class URLClassLoader
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.