Java Reflection API - What is Reflection API in Java?
What is Reflection API in Java?The Reflection API allows Java code to examine classes and objects at run time. The new reflection classes allow you to call another class's methods dynamically at run time. With the reflection classes, you can also examine an instance's fields and change the fields' contents.
The Reflection API consists of the java.lang.Class class and the java.lang.reflect classes: Field, Method, Constructor, Array, and Modifier.
What is Reflection API in Java?Reflection is a process that is used to examine the runtime behaviour of a running application in the JVM. Reflection API allows the creation of an instance of a class whose name is not known until runtime. The custom processing classes can be plug-in into the system, without recompiling the code again. All these processing class are derived by the base class ‘MassageProcessor’.