What are Reflections?

1 answers

Reflections are a mechanism in Java allowing to inspect or modify the application code at runtime. One of the most common usage of the reflection API is retrieving information for a certain class at runtime. Some runtime information that can be retrieved for a class is: class name, fields, methods, super classes, implemented interfaces etc. The usage of the Reflection API adds some performance overhead, so the usage of it should be limited, and if possible, avoided.

shilpigupta22 shilpigupta22 [Author] 4 months ago votes 0