** We make 2 passes - the first to count the number of persistent
** providers and the second to populate the array of ProviderInfos.
*/
while (e != null && e.hasMoreElements())
{
Provider prov = (Provider) e.nextElement();
if (prov.isPersistent())
{
numProviders++;
}
}
e = pl.elements();
retval = new ProviderInfo[numProviders];
int piCtr = 0;
while (e != null && e.hasMoreElements())
{
Provider prov = (Provider) e.nextElement();
if (prov.isPersistent())
{
retval[piCtr++] = new BasicProviderInfo(
prov.getObjectID(),
prov.getDependableFinder(),
prov.getObjectName()
);
}
}
return retval;