All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.mit.ai.psg.jevaES.ClassPathMethods

java.lang.Object
   |
   +----edu.mit.ai.psg.jevaES.ClassPathMethods

public class ClassPathMethods
extends Object

Constructor Index

 o ClassPathMethods()

Method Index

 o clearCaches()
clear caches.
 o dotsToSeparators(String)
for example, if separator char is '/', then converts "java.io.File" to "java/io/File".
 o dotsToSeparators(String, char)
 o findBytecodesInClassPath(String)
 o findInClassPath(Vector, String, String)
 o findSourceInClassPath(String)
classfilename should end in appropriate suffix, .java or .class, and should already have package "."'s converted to java.io.File.separator.
 o getClassPathStrings()
 o verifyPackageNameFromClassPath(String)
If JevaES.checkPackageNames == true, then verify there is a file system directory or zipfile directory in the classpath which corresponds to the package name.
 o verifyPackageNameFromClassPath(Vector, String)

Constructors

 o ClassPathMethods
 public ClassPathMethods()

Methods

 o getClassPathStrings
 public static Vector getClassPathStrings()
 o dotsToSeparators
 public static String dotsToSeparators(String input)
for example, if separator char is '/', then converts "java.io.File" to "java/io/File". For now, assumes separator is single character: if File.separator.length() != 1, throws Error

 o dotsToSeparators
 public static String dotsToSeparators(String input,
                                       char separatorChar)
 o findSourceInClassPath
 public static ClassPathMethods. ClassPathSearchResult findSourceInClassPath(String fullClassName)
classfilename should end in appropriate suffix, .java or .class, and should already have package "."'s converted to java.io.File.separator. Returns an input stream so it can work on .jar files as well as directories in classpath.

Returns:
ClassPathMethods.ClassPathSearchResult to return multiple values; has fields
public String locationPath;
public InputStream stream;
public long modificationDate;
 o findBytecodesInClassPath
 public static ClassPathMethods. ClassPathSearchResult findBytecodesInClassPath(String fullClassName)
 o findInClassPath
 public static ClassPathMethods. ClassPathSearchResult findInClassPath(Vector classPathStrings,
                                                                       String fullClassName,
                                                                       String suffix)
 o verifyPackageNameFromClassPath
 public static boolean verifyPackageNameFromClassPath(String fullPackageName)
If JevaES.checkPackageNames == true, then verify there is a file system directory or zipfile directory in the classpath which corresponds to the package name. Otherwise, just return true (assume name package is ok; if not, error will occur later).

 o verifyPackageNameFromClassPath
 public static boolean verifyPackageNameFromClassPath(Vector classPathStrings,
                                                      String fullPackageName)
 o clearCaches
 public static void clearCaches()
clear caches. Only needed if jar files are rewritten or directory structure in classpath is changed.


All Packages  Class Hierarchy  This Package  Previous  Next  Index