Helper that collects all classinfos from known modules for which pred returns true.
See Implementation
Helper that collects all classinfos from known modules for which pred returns true.