And now with Jochen's feedback ;)
$getStaticMetaClass can I think not be put in an interface. It needs
static information about the exact class this method is in and there is
supposed to be one for each Groovy class we create... if memory serves
me right.
Moving the others to GroovyObject would then be a replacement for
GroovyObjectSupport. You can easily see why interfaces with default
methods does not make that construct a trait. GroovyObjectSupport has a
non-final, non-static, non-public field for the metaclass. Which means
that field cannot be in there. If that field is not in there, then and
get/setMetaClass also not.
get/setProperty as well as invokeMethod are less critical, since they
can use getMetaClass()
But then, what is my idea for Groovy3 here? For me the minimum is to
remove get/setProperty as well as invokeMethod and especially remove
their meaning as Java entry point. I also intend to remove the meta
class in the class itself and have it 100% managed outside. But that
depends.
Historically we had these as convenience for Java. But Java people use
mostly the compiled code anyway and for the others I think it would be
very OK to use something like InvokerHelper instead.
bye Jochen