Part 1: Resource Delegate generators

Can't really cut this one into sub-parts, sorry.
Just tried it and it's flaky. The parent has to assume the implementation verified the method type because `variable instanceof T` is not valid. Then it needs to do an unchecked cast in getMethodDefinition().