Dustin's Pages

Thursday, January 31, 2008

JMX and Introspection Versus Reflection

The difference between Java introspection and reflection is sometimes confusing and the two terms are often used interchangeably. This is not really a problem in most cases from a practical perspective, but there are cases where it does matter and the difference is interesting to note from an intellectual point of view.

Dr. Ira Forman and Nate Forman provide a nice article called Java Reflection in Action (same title as their book) that provides an interesting description of Java reflection and introspection. They refer to reflection as "introspection followed by behavior change." This best fits my understanding of the reflection and introspection and seems to align well with the Javadoc descriptions for the JMX classes cited above.