private Type[] getGenericTypeArguments(Type type) {
	Type[] typeArgs = null;
	if (type instanceof ParameterizedType) {
	    typeArgs = ((ParameterizedType) type).getActualTypeArguments();
	}
	if (typeArgs != null) {
	    for (Type t : typeArgs) {
		if (!(t instanceof Class<?>))
		    return null;
	    }
	}
	return typeArgs;
    }