public static Type[] findParameterizedTypes(Class<?> root, Class<?> searchedFor) {
        if (searchedFor.isInterface()) {
            return findInterfaceParameterizedTypes(root, null, searchedFor);
        }
        return findClassParameterizedTypes(root, null, searchedFor);
    }
public static Type[] findParameterizedTypes(Class<?> root, Class<?> searchedFor) {
        if (searchedFor.isInterface()) {
            return findInterfaceParameterizedTypes(root, null, searchedFor);
        }
        return findClassParameterizedTypes(root, null, searchedFor);
    }
public static Type [ ] findParameterizedTypes ( Class < ? > root , Class < ? > searchedFor ) { if ( searchedFor . isInterface ( ) ) { return findInterfaceParameterizedTypes ( root , null , searchedFor ) ; } return findClassParameterizedTypes ( root , null , searchedFor ) ; }
Search for the given interface or class within the root's class/interface
hierarchy. If the searched for class/interface is a generic return an
array of real types that fill it out.

@param root
@param searchedFor
@return
Search for the given interface or class within the root s class / interface hierarchy . If the searched for class / interface is a generic return an array of real types that fill it out .