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

## com.sun.javatest.util
Class PathClassLoader

    java.lang.Object
      java.lang.ClassLoader
          com.sun.javatest.util.PathClassLoader

    public class PathClassLoader

extends java.lang.ClassLoader

A class loader for loading classes from a path of directories, zip files and jar files.

Constructor Summary
`PathClassLoader(java.io.File[] path)` Create a PathCloader, specifying an array of files for the path.
`PathClassLoader(java.io.File baseDir, java.lang.String pathString)` Create a PathClassLoader, specifying a path and a base directory for any relative files on the path.
`PathClassLoader(java.lang.String pathString)` Create a PathClassLoader, specifying a path.

Method Summary
`protected java.lang.Class` | `loadClass(java.lang.String name, boolean resolve)` Attempt to load a class if it is not already loaded, and optionally resolve any imports it might have.

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PathClassLoader

    public PathClassLoader(java.lang.String pathString)

  Create a PathClassLoader, specifying a path.

  Parameters:
    `pathString` - a string containing a sequence of file paths separated by the platform-specific file separator, identifying a sequence of locations in which to look for classes to be loaded
  See Also:
    `File.pathSeparator`

### PathClassLoader

    public PathClassLoader(java.io.File baseDir,
                           java.lang.String pathString)

  Create a PathClassLoader, specifying a path and a base directory for any relative files on the path.

  Parameters:
    `baseDir` - the base directory for any relative files on the path
    `pathString` - a string containing a sequence of file paths separated by the platform-specific file separator, identifying a sequence of locations in which to look for classes to be loaded
  See Also:
    `File.pathSeparator`

### PathClassLoader

    public PathClassLoader(java.io.File[] path)

  Create a PathCloader, specifying an array of files for the path.

  Parameters:
    `path` - an array of files, identifying a sequence of locations in which to look for classes to be loaded

Method Detail

### loadClass

    protected java.lang.Class loadClass(java.lang.String name,
                                        boolean resolve)
                                 throws java.lang.ClassNotFoundException

  Attempt to load a class if it is not already loaded, and optionally resolve any imports it might have.

  Overrides:
    `loadClass` in class `java.lang.ClassLoader`
  Parameters:
    `name` - The fully-qualified name of the class to load.
    `resolve` - True if imports should be resolved, false otherwise.
  Returns:
    the class that was loaded
  Throws:
    `java.lang.ClassNotFoundException` - if the class was not found.

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

Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.