Understanding reflection

Smalltalk is a reflective language , which means that you not only can query the running system, but you can also modify it while it is running. This is especially useful for analyzing software and building custom tools.

The following pages provide a tutorial introduction to reflection in Smalltalk using GT:

What is Reflection? — introduces Reflection and related terms, with a couple of simple examples and pointers to classic literature.

What is Introspection? — explains with examples how to use reflection to query a running system, namely to query and navigate the running instances, their classes and methods.

What is Intercession? — (stub) explains with examples how to apply reflection to modify a running system. This is useful for adapting a system at run time, for building custom tools, and instrumenting code.