it depends, you can use that method if you are not responsible of the code you are inspecting, or you need to do it in an arbitrary way, otherwise if you have control over the code you are inspecting or it is ad-hoc, probably you can redesign it without reflection
If we're talking about production code then - Big No! It's only okay for some weird testing purposes, but it also sounds kinda wrong and could be solved otherwise
Обсуждают сегодня