Here you can find the source of getGenericTypes(Class> c)
public static final Type[] getGenericTypes(Class<?> c)
//package com.java2s; //License from project: Apache License import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; public class Main { public static final Type[] getGenericTypes(Class<?> c) { Type superClass = c.getGenericSuperclass(); ParameterizedType type = (ParameterizedType) superClass; return type.getActualTypeArguments(); }/* w ww. j av a 2s . c o m*/ }