private boolean obtainServiceBeforeInjecting() { return m_obtainServiceBeforeInjection && ! m_component.injectionDisabled(); }
private void invokeUpdated(Component service, CallbackTypeDef callbackInfo) throws Exception { if (((ComponentContext) service).injectionDisabled()) { return; } boolean callbackFound = false; Object[] instances = getUpdateCallbackInstances(service); for (Object instance : instances) { try { // Only inject if the component instance is not a prototype instance InvocationUtil.invokeCallbackMethod(instance, m_update, callbackInfo.m_sigs, callbackInfo.m_args); callbackFound |= true; } catch (NoSuchMethodException e) { // if the method does not exist, ignore it } } if (! callbackFound) { String[] instanceClasses = Stream.of(instances).map(c -> c.getClass().getName()).toArray(String[]::new); m_logger.log(Logger.LOG_ERROR, "\"" + m_update + "\" configuration callback not found in any of the component classes: " + Arrays.toString(instanceClasses)); } }
if (mainComponentInstance instanceof AbstractDecorator || m_component.injectionDisabled()) { return;