Given
String className = "com.example.MyClass";
How would I be able to check if this class implements a specific interface?
I've tried
Class myClass = Class.forName(className);
if (myClass instanceof MyInterface) {}
and
if (myClass.isInstance(MyInterface.class)) {}
but neither work - obviously the Class object does not inherit MyInterface
What is the proper way to check if a class implements an interface only given the class name?