code: public static <T> List<Class<?>> getTypeArguments(Class<T> baseClass,
  			Class<? extends T> childClass) {
  		Map<Type, Type> resolvedTypes = new HashMap<Type, Type>();
  		fillResolvedTypes(resolvedTypes, childClass);
  		// System.out.println(resolvedTypes);
  		List<Class<?>> list = new ArrayList<Class<?>>();
  		for (TypeVariable<?> variable : baseClass.getTypeParameters()) {
  			Type baseType = variable;
  			while (resolvedTypes.containsKey(baseType)) {
  				baseType = resolvedTypes.get(baseType);
  			}
  			// System.out.println("found:" + baseType);
  			list.add(getClass(baseType));
  		}
  		return list;
  	}
docs: Inspired from http://www.artima.com/weblogs/viewpost.jsp?thread=208860
  Generalized to manage genericInterfaces.
  
  Get the actual type arguments a child class has used to extend a generic
  base class.
  
  @param <T>
  the base class type
  
  @param baseClass
  the base class
  @param childClass
  the child class
  @return a list of the raw classes for the actual type arguments.