I think any solution here is inherently fragile since future versions of flink can have different abstract classes or interfaces you won't know it has to support. But for a given release, something you can consider is a wrapper class that extends/implements the ones you support. Then, during the method invocation, check delegate instanceof ClassWhereMethodComesFrom and no-op if this is false.
>