private static String nodeName(Class<?> c){
  if (c.isArray())   throw new IllegalArgumentException("Arrays have no associated preferences node.");
  String className=c.getName();
  int pkgEndIndex=className.lastIndexOf('.');
  if (pkgEndIndex < 0)   return "/<unnamed>";
  String packageName=className.substring(0,pkgEndIndex);
  return "/" + packageName.replace('.','/');
}

private static String nodeName ( Class < ? > c ) { if ( c . isArray ( ) ) throw new IllegalArgumentException ( "Arrays have no associated preferences node." ) ; String className = c . getName ( ) ; int pkgEndIndex = className . lastIndexOf ( '.' ) ; if ( pkgEndIndex < 0 ) return "/<unnamed>" ; String packageName = className . substring ( 0 , pkgEndIndex ) ; return "/" + packageName . replace ( '.' , '/' ) ; }
returns the absolute path name of the node corresponding to the package of the specified object .
