Extension[] memMgrs = core.getExtensionPoint("memmgr").getExtensions();
if (memMgrs.length != 1) {
throw new InstantiationException(
"memmgr extension point must have 1 extension");
}
Extension memMgr = memMgrs[0];
if (memMgr.getConfigurationElements().length != 1) {
throw new InstantiationException(
"Expected 1 element in memmgr extension");
}
String memMgrClassName = memMgr.getConfigurationElements()[0]
.getAttribute("class");
Class[] consArgTypes = {VmClassLoader.class, HeapHelper.class};
try {
Class cls = Class.forName(memMgrClassName);
Constructor cons = cls.getConstructor(consArgTypes);