code: public static String canonicalizeClassName( String name )
      {
          String classname = name;
          if ( classname.startsWith("modules/"))
              classname = classname.replaceFirst("^modules/[^/]+/", "");
          classname = classname.replaceAll("[/\\\\]", ".");
          if ( classname.startsWith(".") )
              classname = classname.substring(1);
          if ( classname.startsWith("class ") )
              classname = classname.substring(6);
          if ( classname.startsWith("classes.") )
              classname = classname.substring(8);
          if ( classname.endsWith(".class") )
              classname = classname.replaceFirst("\\.[^\\.]+$", "");
          return classname;
      }
docs: Create a proper class name from a messy thing.
  Turn / or \ into .,  remove leading class and trailing .class
  
  Note: this makes lots of strings... could be faster.