Can any one explain the use of Java reflection and introspection? When we need to use both?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Reflection (taken from oracle java tutorial)
Introspection (taken from archive of sun java beans tutorial)
Introspection uses reflection, the relationship between Introspection and Reflection can be seen as similar to JavaBeans and other Java classes.
It might be worth while to look at "Reflection & Introspection: Objects Exposed" where it goes into detail regarding perfomance and usage. Please note that the article is outdated, 1998.
Hope this helps.