public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public static WeldInjectionPointAttributes<?, ?> findDelegateInjectionPoint(AnnotatedType<?> type, Iterable<InjectionPoint> injectionPoints) { WeldInjectionPointAttributes<?, ?> result = null; for (InjectionPoint injectionPoint : injectionPoints) { if (injectionPoint.isDelegate()) { if (result != null) { throw BeanLogger.LOG.tooManyDelegateInjectionPoints(type); } result = InjectionPoints.getWeldInjectionPoint(injectionPoint); } } if (result == null) { throw BeanLogger.LOG.noDelegateInjectionPoint(type); } return result; }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(typeParameter); } else { addNewBeanFromInjectionPoint(weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value()); } } } }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(typeParameter); } else { addNewBeanFromInjectionPoint(weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value()); } } } }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(typeParameter); } else { addNewBeanFromInjectionPoint(weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value()); } } } }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(typeParameter); } else { addNewBeanFromInjectionPoint(weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value()); } } } }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(typeParameter); } else { addNewBeanFromInjectionPoint(weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value()); } } } }
public void addNewBeansFromInjectionPoints(Set<? extends InjectionPoint> injectionPoints) { for (InjectionPoint injectionPoint : injectionPoints) { WeldInjectionPointAttributes<?, ?> weldInjectionPoint = InjectionPoints.getWeldInjectionPoint(injectionPoint); if (weldInjectionPoint.getQualifier(New.class) != null) { Class<?> rawType = Reflections.getRawType(weldInjectionPoint.getType()); if (Event.class.equals(rawType)) { continue; } New _new = weldInjectionPoint.getQualifier(New.class); if (_new.value().equals(New.class)) { if (rawType.equals(Instance.class)) { // e.g. @Inject @New(ChequePaymentProcessor.class) Instance<PaymentProcessor> chequePaymentProcessor; // see WELD-975 Type typeParameter = Reflections.getActualTypeArguments(weldInjectionPoint.getType())[0]; addNewBeanFromInjectionPoint(Reflections.getRawType(typeParameter), typeParameter); } else { addNewBeanFromInjectionPoint(rawType, weldInjectionPoint.getType()); } } else { addNewBeanFromInjectionPoint(_new.value(), _new.value()); } } } }