/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
/** * Gets the declared bean type * * @return The bean type */ public static Type getDeclaredBeanType(Class<?> clazz) { Type[] actualTypeArguments = Reflections.getActualTypeArguments(clazz); if (actualTypeArguments.length == 1) { return actualTypeArguments[0]; } else { return null; } }
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()); } } } }