code: static String getParentPackageName(final String packageOrClassName) {
          if (packageOrClassName.isEmpty()) {
              return null;
          }
          final int lastDotIdx = packageOrClassName.lastIndexOf('.');
          return lastDotIdx < 0 ? "" : packageOrClassName.substring(0, lastDotIdx);
      }
docs: Get the name of the parent package of a parent, or the package of the named class.
  
  @param packageOrClassName
  The package or class name.
  @return the parent package, or the package of the named class, or null if packageOrClassName is the root
  package ("").