Java tutorial
//package com.java2s; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; public class Main { public static <T> Class getClassGenricType(final Class clazz) { Type genType = clazz.getGenericSuperclass(); if (!(genType instanceof ParameterizedType)) { return Object.class; } else { Type[] params = ((ParameterizedType) genType).getActualTypeArguments(); return (Class) params[0]; } } }