Mirror (programming)

In computer programming, a mirror is a reflection mechanism that is completely decoupled from the object whose structure is being introspected. This is as opposed to traditional reflection, for example in Java, where one introspects an object using methods from the object itself (e.g. getClass()).

Mirrors adhere to the qualities of encapsulation, stratification and ontological correspondence.[1]

Benefits

Decoupling the reflection mechanism from the objects themselves allows for a few benefits:

Languages that use mirrors

References

This article is issued from Wikipedia - version of the 2/14/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.