code: protected String extractPackageName(final Class<?> root) {
          return root.getName().substring(0, root.getName().length() - root.getSimpleName().length() - 1);
      }
docs: GWT-friendly method that extracts name of the package from class.
  
  @param root its package will be extracted.
  @return name of root's package.