code: public List<Class<?>> scanClasses(Predicate<String> filter)
      {
          List<Class<?>> discoveredClasses = new ArrayList<>(128);
  
          // For each Forge addon...
          for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted()))
          {
              List<String> discoveredFileNames = filterAddonResources(addon, filter);
  
              // Then try to load the classes.
              for (String discoveredFilename : discoveredFileNames)
              {
                  String clsName = PathUtil.classFilePathToClassname(discoveredFilename);
                  try
                  {
                      Class<?> clazz = addon.getClassLoader().loadClass(clsName);
                      discoveredClasses.add(clazz);
                  }
                  catch (ClassNotFoundException ex)
                  {
                      LOG.log(Level.WARNING, "Failed to load class for name '" + clsName + "':\n" + ex.getMessage(), ex);
                  }
              }
          }
          return discoveredClasses;
      }
docs: Scans all Forge addons for classes accepted by given filter.
  
  TODO: Could be refactored - scan() is almost the same.