Copy prototype function during DI annotation