站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

NbClassLoader (NetBeans Execution API) - NetBeans API Javadoc 5.0.0

 

org.openide.execution
Class NbClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byjava.security.SecureClassLoader
          extended byjava.net.URLClassLoader
              extended byorg.openide.execution.NbClassLoader

public class NbClassLoader
extends URLClassLoader

A class loader which is capable of loading classes from the Repository. XXX the only useful thing this class does is effectively make ExecutionEngine.createPermissions public! Consider deprecating this class...

See Also:
ClassPath.getClassLoader(...)

Field Summary
protected  InputOutput inout
          I/O for classes defined by this classloader.
 
Constructor Summary
NbClassLoader()
          Deprecated. Misuses classpath.
NbClassLoader(FileObject[] roots, ClassLoader parent, InputOutput io)
          Create a new class loader retrieving classes from a set of package roots.
NbClassLoader(FileSystem[] fileSystems)
          Deprecated. Misuses classpath.
NbClassLoader(FileSystem[] fileSystems, ClassLoader parent)
          Deprecated. Misuses classpath.
NbClassLoader(InputOutput io)
          Deprecated. Misuses classpath.
 
Method Summary
protected  Class findClass(String name)
           
protected  PermissionCollection getPermissions(CodeSource cs)
           
 URL getResource(String name)
          Create a URL to a resource specified by name.
 void setDefaultPermissions(PermissionCollection defaultPerms)
          Sets a PermissionsCollectio which will be used for ProtectionDomain of newly created classes.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, 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
 

Field Detail

inout

protected InputOutput inout
I/O for classes defined by this classloader. May be null.

Constructor Detail

NbClassLoader

public NbClassLoader()
Deprecated. Misuses classpath.

Create a new class loader retrieving classes from the core IDE as well as the Repository.

See Also:
FileSystemCapability#EXECUTE, FileSystemCapability#fileSystems

NbClassLoader

public NbClassLoader(InputOutput io)
Deprecated. Misuses classpath.

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()

NbClassLoader

public NbClassLoader(FileObject[] roots,
                     ClassLoader parent,
                     InputOutput io)
              throws FileStateInvalidException
Create a new class loader retrieving classes from a set of package roots.

Parameters:
roots - a set of package roots
parent - a parent loader
io - an I/O tab in the Output Window, or null
Throws:
FileStateInvalidException - if some of the roots are not valid
Since:
XXX

NbClassLoader

public NbClassLoader(FileSystem[] fileSystems)
Deprecated. Misuses classpath.

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

NbClassLoader

public NbClassLoader(FileSystem[] fileSystems,
                     ClassLoader parent)
Deprecated. Misuses classpath.

Create a new class loader.

Parameters:
fileSystems - file systems to load classes from
parent - fallback class loader
Method Detail

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.

Parameters:
name - resource name
Returns:
URL to that resource or null

findClass

protected Class findClass(String name)
                   throws ClassNotFoundException
Throws:
ClassNotFoundException

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)

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.