I saw already two issues that need to retrieve list of classes in autoloaded locations, so I thought it would be very useful to have such methods in core.
This issue introduces two new static functions:
Where $plugintype has a mixed syntax and can be one of the following: 'mod'; 'mod_assign'; array('mod', 'block'); array('mod_assign','block_navigation); '*'
$componenttype can be: 'core'; 'core_course'; array('core_course', 'core_availability'); '*'
Using them core API can find plugins that implement it (as a faster and more structured alternative to callbacks). Since the list of classes in autoloaded locations is already cached, such call will be very fast even across multiple or all plugin and component types.
Also as part of this issue the directory scanning in report_eventlist is replaced with those functions.