I personally would have made it an overridable instance method, but I thought the above implementation worked ok. It taught me a trick I didn't know. :)

I can see how it would bloat the static manifest though.