java.lang.Object
com.sun.jdo.api.persistence.enhancer.util.ClassPath

public class ClassPath extends Object
ClassPath provides class file lookup according to a classpath specification.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a class path from the input String argument.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(com.sun.jdo.api.persistence.enhancer.util.ClassPathElement anElement)
    Append a class path element to the classpath.
    void
    append(File directory)
    Append a directory to the classpath.
    classesInPackage(String packageName)
    Return an enumeration of all of the class files in the specified package in this class path.
    static String
    classNameOf(String fileName)
    Return the vm class name which corresponds to the input file name.
    static String
    fileNameOf(String className)
    Return a file name which might reasonably identify a file containing the specified class.
    static String
    fileNameOf(String className, char separator)
    Return a file name which might reasonably identify a file containing the specified class.
    findClass(String className)
    locate a class file given a fully qualified class name
    boolean
    remove(File directory)
    Remove any class path elements which match directory
    static String
    zipFileNameOf(String className)
    Return a file name which might reasonably identify a file containing the specified class in a zip file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClassPath

      public ClassPath(String path)
      Construct a class path from the input String argument. The path is expected to be in the form appropriate for the current execution environment.
  • Method Details

    • findClass

      public ClassFileSource findClass(String className)
      locate a class file given a fully qualified class name
    • fileNameOf

      public static String fileNameOf(String className, char separator)
      Return a file name which might reasonably identify a file containing the specified class. The name is a "./" relative path.
    • fileNameOf

      public static String fileNameOf(String className)
      Return a file name which might reasonably identify a file containing the specified class. The name is a "./" relative path.
    • zipFileNameOf

      public static String zipFileNameOf(String className)
      Return a file name which might reasonably identify a file containing the specified class in a zip file.
    • classNameOf

      public static String classNameOf(String fileName)
      Return the vm class name which corresponds to the input file name. The file name is expected to be a "./" relative path. Returns null if the file name doesn't end in ".class"
    • remove

      public boolean remove(File directory)
      Remove any class path elements which match directory
    • append

      public void append(File directory)
      Append a directory to the classpath.
    • append

      public void append(com.sun.jdo.api.persistence.enhancer.util.ClassPathElement anElement)
      Append a class path element to the classpath.
    • classesInPackage

      public Enumeration classesInPackage(String packageName)
      Return an enumeration of all of the class files in the specified package in this class path.
      Parameters:
      packageName - specifies the VM format package name to which class files must belong.
      Returns:
      an Enumeration of the VM format class names which can be found. Note that the Enumeration value is of type String and duplicate entries may be returned as the result of finding a class through more than one class path element. Note also that the class name returned might not correspond the the name of the class in the file.