* finally, via a URL from the remote CodeBase.
*/
private Class getClassFromString(String repositoryIDString,
String codebaseURL)
{
RepositoryIdInterface repositoryID
= repIdStrs.getFromString(repositoryIDString);
for (int i = 0; i < 3; i++) {
try {
switch (i)
{
case 0:
// First try to load the class locally
return repositoryID.getClassFromType();
case 1:
// Try to load the class using the provided
// codebase URL (falls out below)
break;
case 2:
// Try to load the class using a URL from the
// remote CodeBase
codebaseURL = getCodeBase().implementation(repositoryIDString);
break;
}
// Don't bother if the codebaseURL is null
if (codebaseURL == null)
continue;
return repositoryID.getClassFromType(codebaseURL);
} catch(ClassNotFoundException cnfe) {
// Will ultimately return null if all three
// attempts fail, but don't do anything here.
} catch (MalformedURLException mue) {