public DataDescriptor [ ] listMembers ( DataDescriptor dd , boolean jmxBased ) { // take care of data members SpdData [ ] dataList = null ; int dataLength = 0 ; if ( ! jmxBased ) { dataList = instance . listData ( ) ; if ( dataList != null ) dataLength = dataList . length ; } // take care of non-data members String [ ] nameList = null ; int itemLength = 0 ; ModuleItem [ ] items = children ( ) ; if ( items != null ) { itemLength = items . length ; nameList = new String [ itemLength ] ; for ( int i = 0 ; i < itemLength ; i ++ ) { String [ ] path = items [ i ] . getInstance ( ) . getPath ( ) ; nameList [ i ] = path [ path . length - 1 ] ; } } // create the returned array // return both item (instance/submodule) descriptor and data descriptor if any if ( itemLength == 0 && dataLength == 0 ) return null ; DataDescriptor [ ] res = new DataDescriptor [ itemLength + dataLength ] ; for ( int i = 0 ; i < itemLength ; i ++ ) { res [ i ] = new DataDescriptor ( dd , nameList [ i ] ) ; } for ( int i = 0 ; i < dataLength ; i ++ ) { res [ i + itemLength ] = new DataDescriptor ( dd , dataList [ i ] . getId ( ) ) ; } return res ; }
dd is the DataDescriptor for this module