Refine search
protected static <T> ProcessBeanAttributesImpl<T> fire(BeanManagerImpl beanManager, BeanAttributes<T> attributes, Annotated annotated, Type type) { ProcessBeanAttributesImpl<T> event = new ProcessBeanAttributesImpl<T>(beanManager, attributes, annotated, type) { }; event.fire(); return event; }
@Override public void veto() { checkWithinObserverNotification(); veto = true; BootstrapLogger.LOG.beanAttributesVetoed(getReceiver(), attributes); }
@Override public void setBeanAttributes(BeanAttributes<T> beanAttributes) { checkWithinObserverNotification(); BootstrapLogger.LOG.setBeanAttributesCalled(getReceiver(), attributes, beanAttributes); attributes = beanAttributes; dirty = true; }
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; } }
@Override public BeanAttributesConfigurator<T> configureBeanAttributes() { if (beanAttributesSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new BeanAttributesConfiguratorImpl<>(attributes, getBeanManager()); } BootstrapLogger.LOG.configureBeanAttributesCalled(getReceiver(), attributes); return configurator; }
@Override public void setBeanAttributes(BeanAttributes<T> beanAttributes) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); BootstrapLogger.LOG.setBeanAttributesCalled(getReceiver(), attributes, beanAttributes); attributes = beanAttributes; dirty = true; beanAttributesSet = true; }
public <T> ProcessBeanAttributesImpl<T> fireProcessBeanAttributes(BeanManagerImpl beanManager, BeanAttributes<T> attributes, Annotated annotated, Type type) { if (isProcessBeanAttributesObserved()) { return ProcessBeanAttributesImpl.fire(beanManager, attributes, annotated, type); } return null; }
@Override public void ignoreFinalMethods() { BootstrapLogger.LOG.ignoreFinalMethodsCalled(getReceiver(), attributes); ignoreFinalMethods = true; }
@Override public Annotated getAnnotated() { checkWithinObserverNotification(); return annotated; }
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; } }
@Override public BeanAttributesConfigurator<T> configureBeanAttributes() { if (beanAttributesSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new BeanAttributesConfiguratorImpl<>(attributes, getBeanManager()); } BootstrapLogger.LOG.configureBeanAttributesCalled(getReceiver(), attributes); return configurator; }
@Override public void setBeanAttributes(BeanAttributes<T> beanAttributes) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); BootstrapLogger.LOG.setBeanAttributesCalled(getReceiver(), attributes, beanAttributes); attributes = beanAttributes; dirty = true; beanAttributesSet = true; }
public <T> ProcessBeanAttributesImpl<T> fireProcessBeanAttributes(BeanManagerImpl beanManager, BeanAttributes<T> attributes, Annotated annotated, Type type) { if (isProcessBeanAttributesObserved()) { return ProcessBeanAttributesImpl.fire(beanManager, attributes, annotated, type); } return null; }
@Override public void ignoreFinalMethods() { BootstrapLogger.LOG.ignoreFinalMethodsCalled(getReceiver(), attributes); ignoreFinalMethods = true; }
@Override public Annotated getAnnotated() { checkWithinObserverNotification(); return annotated; }
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; } }
@Override public BeanAttributesConfigurator<T> configureBeanAttributes() { if (beanAttributesSet) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); if (configurator == null) { configurator = new BeanAttributesConfiguratorImpl<>(attributes, getBeanManager()); } BootstrapLogger.LOG.configureBeanAttributesCalled(getReceiver(), attributes); return configurator; }
@Override public void setBeanAttributes(BeanAttributes<T> beanAttributes) { if (configurator != null) { throw BootstrapLogger.LOG.configuratorAndSetMethodBothCalled(ProcessBeanAttributes.class.getSimpleName(), getReceiver()); } checkWithinObserverNotification(); BootstrapLogger.LOG.setBeanAttributesCalled(getReceiver(), attributes, beanAttributes); attributes = beanAttributes; dirty = true; beanAttributesSet = true; }
@Override public void veto() { checkWithinObserverNotification(); veto = true; BootstrapLogger.LOG.beanAttributesVetoed(getReceiver(), attributes); }
public <T> ProcessBeanAttributesImpl<T> fireProcessBeanAttributes(BeanManagerImpl beanManager, BeanAttributes<T> attributes, Annotated annotated, Type type) { if (isProcessBeanAttributesObserved()) { return ProcessBeanAttributesImpl.fire(beanManager, attributes, annotated, type); } return null; }