This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
at:tutorial:reflection [2008/09/15 18:00] tvcutsem |
at:tutorial:reflection [2008/11/06 16:29] elisag |
||
---|---|---|---|
Line 28: | Line 28: | ||
</ | </ | ||
- | The code excerpt presented above uses the mirror to // | + | The code excerpt presented above uses the mirror to // |
+ | |||
+ | {{: | ||
The code excerpt below shows how one can add and remove slots to and from an object, and how one can explicitly access values and invoke methods upon an object, reflectively: | The code excerpt below shows how one can add and remove slots to and from an object, and how one can explicitly access values and invoke methods upon an object, reflectively: | ||
Line 119: | Line 121: | ||
</ | </ | ||
- | In the code above, the closure passed to '' | + | In the code above, the closure passed to '' |
+ | |||
+ | {{: | ||
When invoking the method '' | When invoking the method '' | ||
Line 135: | Line 140: | ||
The Meta-Object Protocol of AmbientTalk can be divided into a series of independent protocols. Whereas the full semantics and signature of the meta-methods can be found in the [[http:// | The Meta-Object Protocol of AmbientTalk can be divided into a series of independent protocols. Whereas the full semantics and signature of the meta-methods can be found in the [[http:// | ||
- | The **Message | + | The **Message |
+ | |||
+ | {{: | ||
- | The **Object | + | The **Object |
The **Slot Access and Modification Protocol** consists of operations which allow trapping both dynamic access and modification to slots. For instance, '' | The **Slot Access and Modification Protocol** consists of operations which allow trapping both dynamic access and modification to slots. For instance, '' | ||
- | The **Structural Access Protocol** consists of operations used list all available slots, get access to a first-class slot representation and to add new slots to an existing object. The '' | + | The **Structural Access Protocol** |
- | The **Instantiation Protocol** consists of the '' | + | The **Object |
The **Relational Testing Protocol** consists of the methods '' | The **Relational Testing Protocol** consists of the methods '' | ||
- | The **Type | + | The **Type |
The **Evaluation Protocol** ensures that any AmbientTalk object can be part of a parse tree, and therefore every object provides meaningful implementations of the '' | The **Evaluation Protocol** ensures that any AmbientTalk object can be part of a parse tree, and therefore every object provides meaningful implementations of the '' |