I was going to extend my UUID class to let me convert instances to a byte array – the Groovy way, using metaprogramming.
However, while this
works well for
Using delegate.asType(clazz) results in a StackOverflowError.
I also tried other things but none of them worked either.
How can I extend Object#asType(Class) for my own types while delegating to the original code otherwise?