Daniel Gutierrez Diez holds a Master in Computer Science Engineering from the University of Oviedo (Spain) and a Post Grade as Specialist in Foreign Trade from the UNED (Spain).
Daniel has been working for different clients and companies in several Java projects as programmer, designer, trainer, consultant and technical lead.
This guide is about reflection, the ability of a computer program to examine and modify the structure and behavior (specifically the values, meta-data, properties and functions) of the program at runtime.
We are going to explain what reflection is in general and how can be used in Java. Real uses cases about different reflection uses are listed in the next chapters.
Several code snippets will be shown; at the end of this tutorial you can find a compressed file that contains all these examples (and some more).
All code has been written using Eclipse Luna 4.4 and Java update 8.25, no third party libraries are needed.
JCG eBooks are professionally designed, downloadable collections of popular JCG content – articles, interviews, presentations, and research – covering the latest software development technologies, trends, and topics.