protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
protected void validateInterceptor(Interceptor<?> interceptor, BeanManagerImpl manager) { if (interceptor instanceof InterceptorImpl<?>) { EnhancedAnnotatedType<?> annotated = ((InterceptorImpl<?>) interceptor).getEnhancedAnnotated(); if (!BeanMethods.getObserverMethods(annotated).isEmpty() || !BeanMethods.getAsyncObserverMethods(annotated).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveObserverMethods(interceptor); } if (!interceptor.getScope().equals(Dependent.class)) { throw ValidatorLogger.LOG.interceptorOrDecoratorMustBeDependent(interceptor); } while (annotated != null && annotated.getJavaClass() != Object.class) { if (!annotated.getDeclaredEnhancedMethods(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerMethods(interceptor); } if (!annotated.getDeclaredEnhancedFields(Produces.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveProducerFields(interceptor); } if (!annotated.getDeclaredEnhancedMethodsWithAnnotatedParameters(Disposes.class).isEmpty()) { throw ValidatorLogger.LOG.interceptorsCannotHaveDisposerMethods(interceptor); } annotated = annotated.getEnhancedSuperclass(); } } for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { validateInjectionPoint(injectionPoint, manager); } }
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);
beanManager = ((InterceptorImpl<?>) interceptor).getBeanManager(); for (InjectionPoint injectionPoint : interceptor.getInjectionPoints()) { Bean<?> resolvedBean = beanManager.resolve(beanManager.getBeans(injectionPoint)); validateInterceptorDecoratorInjectionPointPassivationCapable(injectionPoint, resolvedBean, beanManager, classBean);