Take a Moment to Reflect
by in CodeSOD on 2016-08-02Modern object-oriented languages tend to support the concept of “reflection”. Reflection lets you inspect an object and find out its methods and invoke them dynamically. If you’re building extensible frameworks where you’re handling objects where their type might not be known until runtime, it can be very useful. On the other hand, if you’re using a strongly typed language and find yourself in this situation frequently… you’re probably doing something wrong.
For that reason, when Adam encounters calls to method.invoke() in Java programs, he gets suspicious. So, when he saw this:






