private static Class<?> getRowType(StatementMetaData statementMetaData) {
        Class<?> returnClassType = statementMetaData.getReturnType();
        if (Collection.class.isAssignableFrom(returnClassType)//
            || Iterable.class == returnClassType // 
            || Iterator.class == returnClassType) {
            return getRowTypeFromCollectionType(statementMetaData, returnClassType);
        } //
        else if (Map.class.isAssignableFrom(returnClassType)) {
            return getRowTypeFromMapType(statementMetaData, returnClassType);
        }
        //
        else if (returnClassType.isArray() && returnClassType != byte[].class) {
            // 数组类型, 支持多重数组
            return returnClassType.getComponentType();
        }

        // 此时代表整个DAO方法只关心结果集第一行
        return returnClassType;
    }
private static Class < ? > getRowType ( StatementMetaData statementMetaData ) { Class < ? > returnClassType = statementMetaData . getReturnType ( ) ; if ( Collection . class . isAssignableFrom ( returnClassType ) || Iterable . class == returnClassType || Iterator . class == returnClassType ) { return getRowTypeFromCollectionType ( statementMetaData , returnClassType ) ; } else if ( Map . class . isAssignableFrom ( returnClassType ) ) { return getRowTypeFromMapType ( statementMetaData , returnClassType ) ; } else if ( returnClassType . isArray ( ) && returnClassType != byte [ ] . class ) { return returnClassType . getComponentType ( ) ; } return returnClassType ; }
获得返回的集合元素类型