private ServiceRegistrar[] buildServiceRegistrar(){
  int k=0;
  ServiceRegistrar[] proxys=new ServiceRegistrar[discoveredLocators.size()];
  Iterator iter=discoveredLocators.iterator();
  while (iter.hasNext()) {
    LocatorReg reg=(LocatorReg)iter.next();
    proxys[k++]=reg.proxy;
  }
  return proxys;
}

private ServiceRegistrar [ ] buildServiceRegistrar ( ) { int k = 0 ; ServiceRegistrar [ ] proxys = new ServiceRegistrar [ discoveredLocators . size ( ) ] ; Iterator iter = discoveredLocators . iterator ( ) ; while ( iter . hasNext ( ) ) { LocatorReg reg = ( LocatorReg ) iter . next ( ) ; proxys [ k ++ ] = reg . proxy ; } return proxys ; }
from each element of the set of locatorreg objects that correspond to lookup services that have been discovered , this method extracts the serviceregistrar reference and returns all of the references in an array of serviceregistrar .
