ServiceReferenceImpl<ResolverHookFactory>[] refs = getHookReferences();
@SuppressWarnings("unchecked")
List<HookReference> hookRefs = refs == null ? Collections.EMPTY_LIST : new ArrayList<CoreResolverHookFactory.HookReference>(refs.length);
if (refs != null)
for (ServiceReferenceImpl<ResolverHookFactory> hookRef : refs) {
ResolverHookFactory factory = context.getService(hookRef);
if (factory != null) {
try {
ResolverHook hook = factory.begin(triggers);
if (hook != null)
hookRefs.add(new HookReference(hookRef, hook));
} catch (Throwable t) {
handleHookException(t, factory, "begin", hookRef.getBundle(), hookRefs, true); //$NON-NLS-1$
}