mercredi 16 octobre 2019

Java : how do I get all supertypes of a give type or all implementations of an interface

I have an abstract base class say JobHandlerBase or possibly an interface IJobHandler.

I C#, I can use reflection to query in an assembly all concrete implementations of this base class or interface I can also do similar. What is the equivalent way to do this in Java 8? I am using Google's Reflection utils including TypeToken for other things but cannot find the easiest way to do this.





Aucun commentaire:

Enregistrer un commentaire