org.apache.jdo.util
Class StringHelper

java.lang.Object
  extended byorg.apache.jdo.util.StringHelper

public class StringHelper
extends java.lang.Object

Helper class providing string utility methods.


Constructor Summary
StringHelper()
           
 
Method Summary
static java.lang.String getPackageName(java.lang.String className)
          Returns the package portion of the specified class
static java.lang.String getShortClassName(java.lang.String className)
          Returns the name of a class without the package name.
static boolean isEmpty(java.lang.String aString)
          Checks if a string is null or empty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringHelper

public StringHelper()
Method Detail

isEmpty

public static boolean isEmpty(java.lang.String aString)
Checks if a string is null or empty.

Parameters:
aString - the string to be checked.
Returns:
true if the string is null or empty after trim, false otherwise.

getPackageName

public static java.lang.String getPackageName(java.lang.String className)
Returns the package portion of the specified class

Parameters:
className - the name of the class from which to extract the package
Returns:
package portion of the specified class

getShortClassName

public static java.lang.String getShortClassName(java.lang.String className)
Returns the name of a class without the package name. For example: if input = "java.lang.Object" , then output = "Object".

Returns:
the unqualified classname