How to check if a class is capable of implementing an interface at runtime in Java (JDK 17)

Advertisements I need to determine whether a class is capable of implementing an interface when it does not explicitly implement that interface. I would like to determine this at runtime, I am using reflections to gather classes. For example: Lets say I have the following class: public class Clazz { public void doSomething() { //… Read More How to check if a class is capable of implementing an interface at runtime in Java (JDK 17)