@Override public void addObserverMethod(ObserverMethod<?> observerMethod) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); validateObserverMethod(observerMethod, getBeanManager(), null); additionalObservers.add(observerMethod); BootstrapLogger.LOG.addObserverMethodCalled(getReceiver(), observerMethod); }
private void processAdditionalObserver(ObserverMethod<?> observer) { validateObserverMethod(observer, getBeanManager(), null); BeanManagerImpl manager = getOrCreateBeanDeployment(observer.getBeanClass()).getBeanManager(); if (Observers.isObserverMethodEnabled(observer, manager)) { ObserverMethod<?> processedObserver = containerLifecycleEvents.fireProcessObserverMethod(manager, observer); if (processedObserver != null) { manager.addObserver(processedObserver); } } }