Powered by Blogger.

What is Reflection and How it Works in Java

>> Monday, September 23, 2013

Reflection is the process of obtaining runtime information about the class or interface.”
Reflection in Java
Runtime information is nothing but deal with the following:
  1. Finding the name of the class or interface. 
  2.  Finding the data members of the class or interface. 
  3. Finding number of constructors (default constructor and number of parameterized constructors).
  4. Number of instance methods.
  5. Number of static methods. 
  6. Determining modifiers of the class (modifiers of the class can be public, final, public + final,abstract and public + abstract).
  7. Obtaining super class of a derived class. 
  8. Obtaining the interfaces which are implemented by various classes.

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.