Here you can find the source of getGenericTypes(ParameterizedType t)
public static Type[] getGenericTypes(ParameterizedType t)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.lang.reflect.*; public class Main { public static Type[] getGenericTypes(ParameterizedType t) { if (t == null) return new Type[] {}; else// w w w.ja va2 s . c o m return t.getActualTypeArguments(); } }