I have a function bellow,
public void park( List>> l){ System.out.println(\"park\"); }
and when I tried
You can get this information through the ParameterizedType
interface.
For example:
final Type parameterType = method.getGenericParameterTypes()[0]; // List>>
if (parameterType instancof ParameterizedType) {
final Type nextDown // List>
= ((ParameterizedType) parameterType).getActualTypeArguments();
}
And keep repeating until it is not a ParameterizedType
.