public static StatLevelSpec[] getInstrumentationLevel(StatDescriptor sd, boolean recursive) {
        if (disabled)
            return null;

        ModuleItem item = findModuleItem(sd.getPath());
        if (item == null) { // wrong moduleName
            return null;
        } else {
            if (!recursive) {
                StatLevelSpec[] pld = new StatLevelSpec[1];
                PmiModule instance = item.getInstance();
                if (instance != null) {
                    pld[0] = new StatLevelSpec(sd.getPath(), instance.getEnabled());
                    return pld;
                } else {
                    return null;
                }
            } else {
                ArrayList res = item.getStatLevelSpec(recursive);
                StatLevelSpec[] pld = new StatLevelSpec[res.size()];
                for (int i = 0; i < pld.length; i++)
                    pld[i] = (StatLevelSpec) res.get(i);

                return pld;
            }
        }
    }
public static StatLevelSpec [ ] getInstrumentationLevel ( StatDescriptor sd , boolean recursive ) { if ( disabled ) return null ; ModuleItem item = findModuleItem ( sd . getPath ( ) ) ; if ( item == null ) { return null ; } else { if ( ! recursive ) { StatLevelSpec [ ] pld = new StatLevelSpec [ 1 ] ; PmiModule instance = item . getInstance ( ) ; if ( instance != null ) { pld [ 0 ] = new StatLevelSpec ( sd . getPath ( ) , instance . getEnabled ( ) ) ; return pld ; } else { return null ; } } else { ArrayList res = item . getStatLevelSpec ( recursive ) ; StatLevelSpec [ ] pld = new StatLevelSpec [ res . size ( ) ] ; for ( int i = 0 ; i < pld . length ; i ++ ) pld [ i ] = ( StatLevelSpec ) res . get ( i ) ; return pld ; } } }
6.0 API