Reflection Madness

Date: 2014-11-20
Begins: 10:20
Ends: 11:00
Room: Grande 1
Level: Intermediate
Track: Hardcore coding
Topics: Reflection, Constructors, Externalizable, Hacking

In this presentation, we will look at some advanced uses of reflection to delegate method calls automatically, to determine where we are being called from and to create new enum values dynamically for unit test purposes, including modifying the switch statements on-the-fly. We will look at how we can use the stack information to determine the class type in a static context. We will demonstrate how Externalizable allows the private state of an object to be read and then modified. Lastly we will demonstrate how we can construct new objects without calling any of the available constructors. This talk will be aimed at the advanced Java specialist who does not shy away from reflection code. Topics from the Java Specialists Newsletter and related research.