Sorry but i will use screenshot as code example
I getting that errors:
error: Delegates with target are not supported as generic type arguments var extending_methods = new ArrayList<ExtendingMethod>();
Delegates with target are not supported as array element type ExtendingMethod[] extending_methods{set;get;}