public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }
public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }
public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }
public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }
public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }
public void validateMetadataInjectionPoint(InjectionPoint ij, Bean<?> bean, MessageCallback<DefinitionException> messageCallback) { // metadata injection points if (ij.getType().equals(InjectionPoint.class) && bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (ij.getType().equals(InjectionPoint.class) && !Dependent.class.equals(bean.getScope())) { throw ValidatorLogger.LOG.injectionIntoNonDependentBean(ij, Formats.formatAsStackTraceElement(ij)); } Class<?> rawType = Reflections.getRawType(ij.getType()); if (Bean.class.equals(rawType) || Interceptor.class.equals(rawType) || Decorator.class.equals(rawType)) { if (bean == null) { throw messageCallback.construct(ij, Formats.formatAsStackTraceElement(ij)); } if (bean instanceof AbstractClassBean<?>) { checkBeanMetadataInjectionPoint(bean, ij, AnnotatedTypes.getDeclaringAnnotatedType(ij.getAnnotated()).getBaseType()); } if (bean instanceof ProducerMethod<?, ?>) { ProducerMethod<?, ?> producerMethod = Reflections.cast(bean); checkBeanMetadataInjectionPoint(bean, ij, producerMethod.getAnnotated().getBaseType()); } } }