On 12/2/2011 2:51 AM, Yong Li wrote: > BTW, what do you want to achieve, switch interface at run-time or > switch implementation at run-time? > The latter. In my example code the interface `foo' is not changed but there exists several implementations.