Class<?> extensionClass = Class.forName(extensionName + ".ExtensionObject", true, child);
try {
return (Extension)extensionClass.newInstance();
} catch (Exception e) {
throw new ExtensionManagerError(
String.format("Can't create an object of extension \"%s\"",
extensionName));
}
} catch (ClassNotFoundException e) {
throw new ExtensionManagerError(String.format("Can't find extension \"%s\"", extensionName));
} catch (MalformedURLException e) {
throw new ExtensionManagerError(String.format("Can't find extension \"%s\"", extensionName));
}
} else {
return null;
}
}