facebook/xctool — pull request #28 by mrevilme (2013-05-07 17:20:33+00:00)
Title: Dynamic formatters

What i wanted to accomplish was to remove the need for a static NSDictionary inside Reporter.m for handling new Reporter types. Just because it will cause conflicts when merging in another branch which might have added reporters.

This also removes the need to #import all formatters inside the Reporter.m, ofc this comes with a trade-off or two (nothing is free in this world).

The trade-offs are:
* Each reporter which wants to be exposed needs to implement the ```@protocol(ExposedReporter)```. This protocol contains 1 optional method which is to give the name of the reporter used on command line. If this is not implemented it will strip "Reporter" from the class name and lowercase it. Eg. ```JSONStreamReporter``` --> ```jsonstream```
* A tiny performance penalty for using the Runtime instead of Compile time. I can pull out some benchmark numbers if interested but my own reasoning for not doing them in the time of writing this is that the penalty will be so small that its insignificant compared to what machines this will run on.