code: public static String getPackageResourcesBaseName( Class clazz )
      {
          final Package pkg = clazz.getPackage();
  
          String baseName;
          if( null == pkg )
          {
              String name = clazz.getName();
              if( -1 == name.lastIndexOf( "." ) )
              {
                  baseName = "Resources";
              }
              else
              {
                  baseName = name.substring( 0, name.lastIndexOf( "." ) ) + ".Resources";
              }
          }
          else
          {
              baseName = pkg.getName() + ".Resources";
          }
  
          return baseName;
      }
docs: Retrieve resource basename for specified Classes package.
  The basename is determined by name of classes package
  postfixed with ".Resources".
  
  @param clazz the Class
  
  @return the resource basename