code: private static String getPackageName(Class<?> klass)
      {
          String className = klass.getName();
          int index = className.lastIndexOf('.');
          return index == -1 ? "" : className.substring(0, index);
      }
docs: RTC102289