net.sf.tlc.util
Class ClassPathUtils

java.lang.Object
  extended bynet.sf.tlc.util.ClassPathUtils

public final class ClassPathUtils
extends java.lang.Object

ClassPathUtils provides a set of static utility methods used in the manipulation of paths to classes.

Author:
aisrael

Method Summary
static java.lang.String toClassName(java.lang.String path)
          Returns the expected class name from a class file's absolute path or null if the path does not end with ".class".
static java.lang.String toClassName(java.lang.String baseDir, java.lang.String absolutePath)
          Returns the expected class name from a class file's absolute path and the 'base dir' to calculate it from, or null if the absolutePath does not start with the baseDir and does not end with ".class".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toClassName

public static java.lang.String toClassName(java.lang.String path)
Returns the expected class name from a class file's absolute path or null if the path does not end with ".class".

Parameters:
path - the absolute path to the class
Returns:
the expected class name, or null

toClassName

public static java.lang.String toClassName(java.lang.String baseDir,
                                           java.lang.String absolutePath)
Returns the expected class name from a class file's absolute path and the 'base dir' to calculate it from, or null if the absolutePath does not start with the baseDir and does not end with ".class".

Parameters:
baseDir - the base directory
absolutePath - the absolute path to the class
Returns:
the expected class name, or null


Copyright © 2005 TheLittleContainer. All Rights Reserved.