use of org.eclipse.osgi.internal.weaving.WeavingHookConfigurator in project rt.equinox.framework by eclipse.
the class HookRegistry method initialize.
/**
* Initializes the hook configurators. The following steps are used to initialize the hook configurators. <p>
* 1. Get a list of hook configurators from all hook configurators properties files on the classpath,
* add this list to the overall list of hook configurators, remove duplicates. <p>
* 2. Get a list of hook configurators from the ("osgi.hook.configurators.include") system property
* and add this list to the overall list of hook configurators, remove duplicates. <p>
* 3. Get a list of hook configurators from the ("osgi.hook.configurators.exclude") system property
* and remove this list from the overall list of hook configurators. <p>
* 4. Load each hook configurator class, create a new instance, then call the {@link HookConfigurator#addHooks(HookRegistry)} method <p>
* 5. Set this HookRegistry object to read only to prevent any other hooks from being added. <p>
*/
public void initialize() {
List<String> configurators = new ArrayList<>(5);
// optimistic that no errors will occur
List<FrameworkLogEntry> errors = new ArrayList<>(0);
mergeFileHookConfigurators(configurators, errors);
mergePropertyHookConfigurators(configurators);
synchronized (this) {
addClassLoaderHook(new DevClassLoadingHook(container.getConfiguration()));
addClassLoaderHook(new EclipseLazyStarter(container));
addClassLoaderHook(new WeavingHookConfigurator(container));
configurators.add(SignedBundleHook.class.getName());
loadConfigurators(configurators, errors);
// set to read-only
initialized = true;
}
for (FrameworkLogEntry error : errors) {
container.getLogServices().getFrameworkLog().log(error);
}
}
Aggregations