Type resolving with reflection api