facebook/swift — pull request #102 by andrewcox (2013-07-18 00:18:56+00:00)
Title: Allow binding custom thrift codecs by class

All overloads of bindThriftCodec() actually assumed the class you were referring to was a thrift type, and created a binding for the codec using a provider that would ask the codec manager for an appropriate codec. Only one overload let you install a custom codec, and it required an instance, which is problematic because sometimes you want to create a custom codec that depends on an injected ThriftCatalog or ThriftCodecManager.

I renamed this overload bindThriftCustomCodec() to help reduce confusion between overloads that take a thrift type argument, and overloads that take a codec argument, and then added more overloads of this bindThriftCustomCodec() that will take class, typeliteral, and key.