class ReflectionUtil {

    public static Class<?> getComponentType(Class<?> clazz) {
        if (clazz == null) {
            return null;
        }

        return getComponentType(clazz.getGenericSuperclass(), null);
    }

}