aspose file tools*
The moose likes Java in General and the fly likes Diff. between Introspection and Reflection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Diff. between Introspection and Reflection" Watch "Diff. between Introspection and Reflection" New topic
Author

Diff. between Introspection and Reflection

Abrahim Daver
Ranch Hand

Joined: Aug 06, 2004
Posts: 69
What are introspection and reflection and what are difference between them, Can someone elaborate these two points.
M Beck
Ranch Hand

Joined: Jan 14, 2005
Posts: 323
to the best of my knowledge, there is no difference between them; i have always understood the terms to be synonyms. that said, in Java the word "reflection" seems to be the preferred one, the word "introspection" seems more popular among users of some other languages.

what the thing does is let you operate on the structure of classes. Sun has a tutorial on the topic, and it is also mentioned in the API.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I think I muddled another thread by confusing them. The words may be synonomous in the real world, but Java seems to have formalized Introspection to mean some mechanisms you can use to inspect JavaBeans, and reflection to mean some lower level inspection of classes. See JavaDoc for Introspector and Class to see if that distinction holds up and makes sense.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
wood burning stoves
 
subject: Diff. between Introspection and Reflection