What is Reflection in Java
Reflection is a mechanism for obtaining data about a program during its execution (runtime). In Java, Reflection is implemented using the Java Reflection API, which consists of the package classes java.lang and java.lang.reflect.
Java Reflection API features:
- Object class definition;
- Getting information about class modifiers, fields, methods, constructors and superclasses;
- Defining the interfaces implemented by the class;
- Creating an instance of the class;
- Getting and setting values of object fields;
- Calling object methods;
- Creation of a new array.
Read also:
Comments
Post a Comment