Reflection, Annotations, and JavaBeans
Christian Ullenboom · 2024
Reflection gives us the ability to look inside a running Java program. We can ask a class what properties it has, and later call methods on arbitrary objects and read and modify object or class variables. Many frameworks make use of the Reflection API, such as JPA (Jakarta Persistence API) for object-relational mapping or Jakarta XML Binding (JAXB) for mapping Java objects to XML structures. We will program some examples ourselves that would not be possible without Reflection.