public StatsImpl getStats(int[] dataIds, boolean recursive) {
        if (dataIds == null)
            return getStats(recursive);

        if (instance == null)
            return null;

        SpdData[] dataList = instance.listData(dataIds);
        ModuleItem[] items = children();
        ArrayList dataMembers = null; // return data members
        ArrayList colMembers = null; // return subcollection members

        // convert from Spd to Wpd and set dataMembers
        if (dataList != null) {
            dataMembers = new ArrayList(dataList.length);
            for (int i = 0; i < dataList.length; i++) {
                dataMembers.add(dataList[i].getStatistic());
            }
        }

        // getStats from children
        if (recursive && (items != null)) {
            colMembers = new ArrayList(items.length);
            for (int i = 0; i < items.length; i++) {
                colMembers.add(items[i].getStats(dataIds, recursive));
            }
        }

        // return Stats - individual instance will return different XXXStats instance
        // Note: construct dataMembers in ModuleItem and pass it to instance
        //       because getStats will be overwritten by subclasses
        //       and we don't want to duplicate the same code.
        return instance.getStats(dataMembers, colMembers);
    }
public StatsImpl getStats ( int [ ] dataIds , boolean recursive ) { if ( dataIds == null ) return getStats ( recursive ) ; if ( instance == null ) return null ; SpdData [ ] dataList = instance . listData ( dataIds ) ; ModuleItem [ ] items = children ( ) ; ArrayList dataMembers = null ; ArrayList colMembers = null ; if ( dataList != null ) { dataMembers = new ArrayList ( dataList . length ) ; for ( int i = 0 ; i < dataList . length ; i ++ ) { dataMembers . add ( dataList [ i ] . getStatistic ( ) ) ; } } if ( recursive && ( items != null ) ) { colMembers = new ArrayList ( items . length ) ; for ( int i = 0 ; i < items . length ; i ++ ) { colMembers . add ( items [ i ] . getStats ( dataIds , recursive ) ) ; } } return instance . getStats ( dataMembers , colMembers ) ; }
If more PmiModule.listStatistics methods are implemented,
this method can be simplified as listData(recursive)
Leave it alone now.