classpathhelper
Class StringUtils

java.lang.Object
  extended byclasspathhelper.StringUtils

public class StringUtils
extends java.lang.Object

Utility class containing many of the common string related routines needed by a classloader. Results from these methods are often maintained in a SessionCache to avoid recomputing them.

The algorithms are broken out in this utility (as opposed to being included in the cache) so as to allow them to be called when no cache exists.

Since:
1.1
Author:
bharris

Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String classToPath(java.lang.String classname)
          Converts a class name to its likely path (including the .class extendsion).
static java.lang.String convertPathToPackage(java.lang.String pathName)
          Converts a path to a package name.
static java.lang.String[] determineClassNames(java.lang.String pathName)
          Converts a path to both its basic class name and its fully qualified class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

convertPathToPackage

public static java.lang.String convertPathToPackage(java.lang.String pathName)
Converts a path to a package name.

Parameters:
pathName - The path (no class or content name included).
Returns:
The package name
Since:
1.1

determineClassNames

public static java.lang.String[] determineClassNames(java.lang.String pathName)
Converts a path to both its basic class name and its fully qualified class name.

Parameters:
pathName - the path name.
Returns:
An array of size two. The first parameter is the basic class name (no package), the second element is the fully qualified class name.
Since:
1.1

classToPath

public static java.lang.String classToPath(java.lang.String classname)
Converts a class name to its likely path (including the .class extendsion).

Parameters:
classname - The class name.
Returns:
The likely path for this class.