@Override public InterceptorConfigurator addInterceptor() { InterceptorConfiguratorImpl configurator = new InterceptorConfiguratorImpl(getBeanManager()); additionalBeans.add(BeanRegistration.of(configurator)); return configurator; }
@Override public InterceptorConfigurator addInterceptor() { InterceptorConfiguratorImpl configurator = new InterceptorConfiguratorImpl(getBeanManager()); additionalBeans.add(BeanRegistration.of(configurator)); return configurator; }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
private void validateInterceptor(Interceptor<?> interceptor) { Set<Annotation> bindings = interceptor.getInterceptorBindings(); if (bindings == null) { throw InterceptorLogger.LOG.nullInterceptorBindings(interceptor); } for (Annotation annotation : bindings) { if (!getBeanManager().isInterceptorBinding(annotation.annotationType())) { throw MetadataLogger.LOG.notAnInterceptorBinding(annotation, interceptor); } } }
@Override public void addObserverMethod(ObserverMethod<?> observerMethod) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); validateObserverMethod(observerMethod, getBeanManager()); additionalObservers.add(observerMethod); BootstrapLogger.LOG.addObserverMethodCalled(getReceiver(), observerMethod); }
@Override public void addBean(Bean<?> bean) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(bean, "bean"); ExternalBeanAttributesFactory.validateBeanAttributes(bean, getBeanManager()); validateBean(bean); additionalBeans.add(bean); BootstrapLogger.LOG.addBeanCalled(getReceiver(), bean); }
@Override public void addObserverMethod(ObserverMethod<?> observerMethod) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); validateObserverMethod(observerMethod, getBeanManager(), null); additionalObservers.add(ObserverRegistration.of(observerMethod, getReceiver())); BootstrapLogger.LOG.addObserverMethodCalled(getReceiver(), observerMethod); }
@Override public void addObserverMethod(ObserverMethod<?> observerMethod) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); validateObserverMethod(observerMethod, getBeanManager(), null); additionalObservers.add(ObserverRegistration.of(observerMethod, getReceiver())); BootstrapLogger.LOG.addObserverMethodCalled(getReceiver(), observerMethod); }
@Override public void addObserverMethod(ObserverMethod<?> observerMethod) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(observerMethod, "observerMethod"); validateObserverMethod(observerMethod, getBeanManager(), null); additionalObservers.add(ObserverRegistration.of(observerMethod, getReceiver())); BootstrapLogger.LOG.addObserverMethodCalled(getReceiver(), observerMethod); }
@Override public void addBean(Bean<?> bean) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(bean, "bean"); ExternalBeanAttributesFactory.validateBeanAttributes(bean, getBeanManager()); validateBean(bean); additionalBeans.add(BeanRegistration.of(bean, getReceiver())); BootstrapLogger.LOG.addBeanCalled(getReceiver(), bean); }
@Override public void addBean(Bean<?> bean) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(bean, "bean"); ExternalBeanAttributesFactory.validateBeanAttributes(bean, getBeanManager()); validateBean(bean); additionalBeans.add(BeanRegistration.of(bean, getReceiver())); BootstrapLogger.LOG.addBeanCalled(getReceiver(), bean); }
@Override public void addBean(Bean<?> bean) { checkWithinObserverNotification(); Preconditions.checkArgumentNotNull(bean, "bean"); ExternalBeanAttributesFactory.validateBeanAttributes(bean, getBeanManager()); validateBean(bean); additionalBeans.add(BeanRegistration.of(bean, getReceiver())); BootstrapLogger.LOG.addBeanCalled(getReceiver(), bean); }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void validateDecorator(Decorator<?> decorator) { Set<Annotation> qualifiers = decorator.getDelegateQualifiers(); if (decorator.getDelegateType() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDelegateType", decorator); } Bindings.validateQualifiers(qualifiers, getBeanManager(), decorator, "Decorator.getDelegateQualifiers"); if (decorator.getDecoratedTypes() == null) { throw BeanLogger.LOG.decoratorMethodReturnsNull("getDecoratedTypes", decorator); } }
private void processObserverRegistration(ObserverRegistration registration) { ObserverMethod<?> observerMethod = registration.initObserverMethod(); validateObserverMethod(observerMethod, getBeanManager(), null); BeanManagerImpl manager = getOrCreateBeanDeployment(observerMethod.getBeanClass()).getBeanManager(); if (Observers.isObserverMethodEnabled(observerMethod, manager)) { ObserverMethod<?> processedObserver = containerLifecycleEvents.fireProcessObserverMethod(manager, observerMethod, registration.extension); if (processedObserver != null) { manager.addObserver(processedObserver); } } }
private void processObserverRegistration(ObserverRegistration registration) { ObserverMethod<?> observerMethod = registration.initObserverMethod(); validateObserverMethod(observerMethod, getBeanManager(), null); BeanManagerImpl manager = getOrCreateBeanDeployment(observerMethod.getBeanClass()).getBeanManager(); if (Observers.isObserverMethodEnabled(observerMethod, manager)) { ObserverMethod<?> processedObserver = containerLifecycleEvents.fireProcessObserverMethod(manager, observerMethod, registration.extension); if (processedObserver != null) { manager.addObserver(processedObserver); } } }