Small survey on the usage of the metaclass system and MOP
Jochen Theodorou <[email protected]>
| Newsgroups | gmane.comp.lang.groovy.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I would like to know from users on this list mostly if they are using
specific features of the meta class system and MOP, but especially what for.
(1) categories
https://blog.mrhaki.com/2009/09/groovy-goodness-use-categories-to-add.html
shows an example. Basically you have
use (CategoryClass) {
// some code and callstack here influenced by CategoryClass
}
I am especially interested in knowing if you try to add a method to code
that is not part if the use-block here.
(2) per instance meta classes
https://groovy-lang.org/metaprogramming.html#_per_instance_metaclass
shows examples here
Anyone using that?
(3) Custom meta class
Anyway trying to force the usage of something else then MetaClassImpl
for the meta class? If you do not understand the question at all, then
the answer would be no.
bye Jochen