September 2019
Intermediate to advanced
816 pages
18h 47m
English
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.IntegerSimple name of type argument: Integer
Read now
Unlock full access