use of com.ibm.oti.shared.SharedClassURLHelper in project openj9 by eclipse.
the class CustomURLClassLoaderNonConfirming method getURLHelper.
public void getURLHelper() throws Exception {
SharedClassHelperFactory schFactory = Shared.getSharedClassHelperFactory();
SharedClassURLHelper newHelper = null;
newHelper = schFactory.getURLHelper(this);
}
use of com.ibm.oti.shared.SharedClassURLHelper in project openj9 by eclipse.
the class CDSHookImpls method classLoaderCreated.
public void classLoaderCreated(ModuleClassLoader classLoader) {
// try to get the url helper for this class loader
if (factory == null) {
return;
}
CDSBundleFile hostFile = null;
try {
SharedClassURLHelper urlHelper = factory.getURLHelper(classLoader);
boolean minimizeSucceeded = runMinimizeMethod(urlHelper);
// set the url helper for the host base CDSBundleFile
hostFile = getCDSBundleFile(classLoader.getClasspathManager().getGeneration().getBundleFile());
if (hostFile != null) {
hostFile.setURLHelper(urlHelper);
if (minimizeSucceeded) {
/* In Java6, there is no longer a requirement to "prime" plugins */
hostFile.setPrimed(true);
}
}
} catch (HelperAlreadyDefinedException e) {
// We should never get here.
// If we do, we simply won't share for this ClassLoader
}
}
use of com.ibm.oti.shared.SharedClassURLHelper in project openj9 by eclipse.
the class CDSHookImpls method wrapBundleFile.
// ////////////// BundleFileWrapperFactoryHook //////////////
public BundleFileWrapper wrapBundleFile(BundleFile bundleFile, Generation generation, boolean base) {
// wrap the real bundle file for purposes of loading shared classes.
CDSBundleFile newBundleFile;
if (!base && generation.getBundleInfo().getBundleId() != 0) {
// initialize the urlHelper from the base one.
SharedClassURLHelper urlHelper = null;
BundleFile baseFile = generation.getBundleFile();
if ((baseFile = getCDSBundleFile(baseFile)) != null) {
urlHelper = ((CDSBundleFile) baseFile).getURLHelper();
}
newBundleFile = new CDSBundleFile(bundleFile, urlHelper);
} else {
newBundleFile = new CDSBundleFile(bundleFile);
}
return newBundleFile;
}
Aggregations