One possible way to reuse the code

* Create the FilterFactory interface I suggested earlier
* Have your FilterFactory implementation go through the Description tree to find all categories used by any of the test classes or methods that match your globs. It would then use that information to create an instance of Categories.FilterFactory and return that

That might require additional creational methods for Categories.FilterFactory. If so, it would be great to get that in soon.

My hope is we can get in the changes so that developers have the hooks they need to do command-line based filtering before the next major version, assuming the changes are small. Implementations of FilterFactory could be added in a later release or to junit.contrib