I am working on a project where there are a lot of objects that are created by a library, and I have no access to the creation process of these objects.
The following sn
Depending on your java version, you could use the lambda expression (with java 8).
The code would be relatively simple:
Clazz o = .... // Here you obtain your object through third party library
ExampleInterface yourInterface = o::run;
yourInterface.run();
Note that this only works for interface with one method. Both signatures (interface and Clazz) must match.