code: public static String getPath(BaseMenuComponent comp) {
          StringBuilder sb = new StringBuilder();
          getPath(comp, sb);
          return sb.toString();
      }
docs: Returns the path of the given menu or menu item.
  
  @param comp A menu or menu item.
  @return The full path of the menu item.