Here you can find the source of getGenericSuperType(Type t)
private static Type getGenericSuperType(Type t)
//package com.java2s; //License from project: Open Source License import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; public class Main { private static Type getGenericSuperType(Type t) { if (t instanceof Class) { return ((Class) t).getGenericSuperclass(); } else if (t instanceof ParameterizedType) { return getGenericSuperType(((ParameterizedType) t).getRawType()); }//from w w w . j a v a 2 s. c o m return null; } }