Generics of a superclass

Getting the generics of a superclass can be accomplished by calling the getGenericSuperclass() method of the current class:

Type superclassType = clazz.getGenericSuperclass();

Calling printGenerics(superclassType) will output the following:

Class of type argument: class java.lang.String
Simple name of type argument: String

Class of type argument: class modern.challenge.Seed
Simple name of type argument: Seed

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.34.25