Getting the generics of implemented interfaces can be accomplished by calling the getGenericInterfaces() method of the current class:
Type[] interfacesTypes = clazz.getGenericInterfaces();
Further, we call printGenerics() for each Type. Following is the output (there is a single interface, Comparable<Integer>):
Class of type argument: class java.lang.Integer
Simple name of type argument: Integer