Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.execution 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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. 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, defineClass`

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, 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.

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

  Overrides:
    `getPermissions` in class `URLClassLoader`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.execution 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.