Class ClassPath
java.lang.Object
com.sun.jdo.api.persistence.enhancer.util.ClassPath
ClassPath provides class file lookup according to a classpath
specification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(com.sun.jdo.api.persistence.enhancer.util.ClassPathElement anElement) Append a class path element to the classpath.voidAppend 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 StringclassNameOf(String fileName) Return the vm class name which corresponds to the input file name.static StringfileNameOf(String className) Return a file name which might reasonably identify a file containing the specified class.static StringfileNameOf(String className, char separator) Return a file name which might reasonably identify a file containing the specified class.locate a class file given a fully qualified class namebooleanRemove any class path elements which match directorystatic StringzipFileNameOf(String className) Return a file name which might reasonably identify a file containing the specified class in a zip file.
-
Constructor Details
-
ClassPath
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
locate a class file given a fully qualified class name -
fileNameOf
Return a file name which might reasonably identify a file containing the specified class. The name is a "./" relative path. -
fileNameOf
Return a file name which might reasonably identify a file containing the specified class. The name is a "./" relative path. -
zipFileNameOf
Return a file name which might reasonably identify a file containing the specified class in a zip file. -
classNameOf
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
Remove any class path elements which match directory -
append
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
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.
-