src/main/java/com/rockagen/commons/util/ReflexUtil.java
public static Type getInterfacesGenricType(final Class<?> clazz, int index) {
        Type[] types = getInterfacesGenricTypes(clazz);
        if (index < 0) {
            log.warn(
                    "{}'s index must be greater than 0,return the 0",
                    clazz == null ? Object.class.getSimpleName() : clazz
                            .getSimpleName());
            return types[0];
        } else if (index > types.length) {
            log.warn(
                    "{}'s index in {} not found,return the last",
                    clazz == null ? Object.class.getSimpleName() : clazz
                            .getSimpleName(), index);
            return types[types.length - 1];
        } else {
            return types[index];
        }
    }
public static Type getInterfacesGenricType(final Class<?> clazz, int index) {
        Type[] types = getInterfacesGenricTypes(clazz);
        if (index < 0) {
            log.warn(
                    "{}'s index must be greater than 0,return the 0",
                    clazz == null ? Object.class.getSimpleName() : clazz
                            .getSimpleName());
            return types[0];
        } else if (index > types.length) {
            log.warn(
                    "{}'s index in {} not found,return the last",
                    clazz == null ? Object.class.getSimpleName() : clazz
                            .getSimpleName(), index);
            return types[types.length - 1];
        } else {
            return types[index];
        }
    }
obtained the interface generic parameter type
<p>
for example:
</p>
<code>
ClassB&lt;T&gt; implements ClassA&lt;T&gt;
</code>

@param clazz {@link java.lang.Class}
@param index
start 0
@return Type