code: public static String extractPackage(String classname) {
      if (classname.contains("."))
        return classname.substring(0, classname.lastIndexOf("."));
      else
        return DEFAULT_PACKAGE;
    }
docs: Extracts the package name from the (clean) classname.
  
  @param classname	the classname to extract the package from
  @return		the package name