code: private static String getPackageName(String className) {
          int end = className.lastIndexOf('.');
          return (end > 0) ? className.substring(0, end) : "";
      }
docs: Return the package name of a given class name
  
  @param className
  The class name from which to find the package name
  @return The package name of the class (the empty string is returned for
  the default package