public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
public static boolean isObserverMethodEnabled(ObserverMethod<?> method, BeanManagerImpl manager) { if (method instanceof ObserverMethodImpl<?, ?>) { Bean<?> declaringBean = Reflections.<ObserverMethodImpl<?, ?>> cast(method).getDeclaringBean(); return manager.getServices().get(SpecializationAndEnablementRegistry.class).isCandidateForLifecycleEvent(declaringBean); } return true; }
public boolean isCandidateForLifecycleEvent(Bean<?> bean) { if (bean instanceof AbstractProducerBean<?, ?, ?>) { AbstractProducerBean<?, ?, ?> producer = cast(bean); if (!isCandidateForLifecycleEvent(producer.getDeclaringBean())) { return false; } } return isEnabledInAnyBeanDeployment(bean) && !isSpecializedInAnyBeanDeployment(bean); }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } return false; } }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } if (event.isIgnoreFinalMethods()) { bean.setIgnoreFinalMethods(); } return false; } }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } if (event.isIgnoreFinalMethods()) { bean.setIgnoreFinalMethods(); } return false; } }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } if (event.isIgnoreFinalMethods()) { bean.setIgnoreFinalMethods(); } return false; } }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } if (event.isIgnoreFinalMethods()) { bean.setIgnoreFinalMethods(); } return false; } }
protected <T, S> boolean fireProcessBeanAttributes(AbstractBean<T, S> bean) { if (!specializationAndEnablementRegistry.isCandidateForLifecycleEvent(bean)) { return false; } ProcessBeanAttributesImpl<T> event = containerLifecycleEvents.fireProcessBeanAttributes(getManager(), bean, bean.getAnnotated(), bean.getType()); if (event == null) { return false; } if (event.isVeto()) { return true; } if (event.isDirty()) { bean.setAttributes(ExternalBeanAttributesFactory.<T>of(event.getBeanAttributesInternal(), manager)); bean.checkSpecialization(); } if (event.isIgnoreFinalMethods()) { bean.setIgnoreFinalMethods(); } return false; } }