Autowiring of types according to deriving types