private static StatsImpl getStats(ModuleItem moduleItem, boolean recursive) {
        // Note: cannot retrieve single data for JMX interface
        //int[] dataIds = msd.getDataIds();
        if (moduleItem == null) { // not found
            return null;
        }

        return moduleItem.getStats(recursive);

        /*
         * else if(moduleItem.getInstance() == null)
         * { // root module item
         * return getServer(recursive);
         * }
         * else
         * {
         * return moduleItem.getStats(recursive);
         * }
         */
    }
private static StatsImpl getStats ( ModuleItem moduleItem , boolean recursive ) { if ( moduleItem == null ) { return null ; } return moduleItem . getStats ( recursive ) ; }
/*
// Return a StatsImpl for server data
// Take a boolean parameter for two modes: recursive and non-recursive
private static StatsImpl getServer(boolean recursive)
{
// Note: there is no data under directly under server module tree root,
// so return null if not recursive
if(!recursive) return null;
ModuleItem[] modItems = moduleRoot.children();
if(modItems == null)
{
return new StatsImpl("server", TYPE_SERVER, moduleRoot.level, null, null);
}
ArrayList modMembers = new ArrayList(modItems.length);
for(int i=0; i<modItems.length; i++)
{
modMembers.add(modItems[i].getStats(recursive));
}
StatsImpl sCol = new StatsImpl("server", TYPE_SERVER, moduleRoot.level, null, modMembers);
return sCol;
}