Tries to determine the type arguments of a class/interface based on a super parameterized type's type arguments.
This method is the inverse of
#getTypeArguments(Type,Class) which gets a class/interface's type
arguments based on a subtype. It is far more limited in determining the type arguments for the subject class's
type variables in that it can only determine those parameters that map from the subject
Class object to
the supertype.
Example:
java.util.TreeSet sets its parameter as the parameter for
java.util.NavigableSet, which in turn sets the parameter of
java.util.SortedSet, which in turn sets the parameter
of
Set, which in turn sets the parameter of
java.util.Collection, which in turn sets the
parameter of
java.lang.Iterable. Since TreeSet
's parameter maps (indirectly) to
Iterable
's parameter, it will be able to determine that based on the super type
Iterable>>
, the parameter of TreeSet
is
? extends Map>
.