Binary code on blue background with a magnifying glass held over it.

The Reflection API

We use the Reflection API to find out about the internals of a Java class — its fields, constructors, methods and annotations. We can also use it to programmatically instantiate objects, invoke methods and access fields at runtime.

This is a very powerful API. It is used extensively by JEE containers, the Spring framework, GUI builders and other APIs.

Continue reading