google/dagger — pull request #7 by cgruber (2013-06-12 01:26:48+00:00)
Title: Rework Loader to throw fewer exceptions in the normal course of business.

This reworks the Loader used by default in Dagger, so that rather than trying to be a one-size-fits-all aggregator, and maintaining a bunch of complexity to make the behaviours work in a consistent way when chained.

The new approach simply does the "try to load, then fail over to reflection" pattern. What were formerly (and somewhat artificially) shoehorned into a Loader API are now simply static utilities which can be used to create other loaders if needed.

In the process, we avoid using exceptions in the normal course of the try-then-fall-back, since stack traces are expensive and classloading already throws enough internal exceptions - we don't have to contribute to that pain.