private <U extends T> WeldInstance<U> selectInstance(Type subtype, Annotation[] newQualifiers) { InjectionPoint modifiedInjectionPoint = new FacadeInjectionPoint(getBeanManager(), getInjectionPoint(), Instance.class, subtype, getQualifiers(), newQualifiers); return new InstanceImpl<U>(modifiedInjectionPoint, getCreationalContext(), getBeanManager()); }
private <U extends T> WeldInstance<U> selectInstance(Type subtype, Annotation[] newQualifiers) { InjectionPoint modifiedInjectionPoint = new FacadeInjectionPoint(getBeanManager(), getInjectionPoint(), Instance.class, subtype, getQualifiers(), newQualifiers); return new InstanceImpl<U>(modifiedInjectionPoint, getCreationalContext(), getBeanManager()); }
private <U extends T> WeldInstance<U> selectInstance(Type subtype, Annotation[] newQualifiers) { InjectionPoint modifiedInjectionPoint = new FacadeInjectionPoint(getBeanManager(), getInjectionPoint(), Instance.class, subtype, getQualifiers(), newQualifiers); return new InstanceImpl<U>(modifiedInjectionPoint, getCreationalContext(), getBeanManager()); }
private <U extends T> WeldInstance<U> selectInstance(Type subtype, Annotation[] newQualifiers) { InjectionPoint modifiedInjectionPoint = new FacadeInjectionPoint(getBeanManager(), getInjectionPoint(), Instance.class, subtype, getQualifiers(), newQualifiers); return new InstanceImpl<U>(modifiedInjectionPoint, getCreationalContext(), getBeanManager()); }
@Override public Comparator<Handler<?>> getPriorityComparator() { return new PriorityComparator(getBeanManager().getServices().get(AnnotationApiAbstraction.class)); }
@Override public Comparator<Handler<?>> getPriorityComparator() { return new PriorityComparator(getBeanManager().getServices().get(AnnotationApiAbstraction.class)); }
private T getBeanInstance(Bean<?> bean) { final ThreadLocalStackReference<InjectionPoint> stack = currentInjectionPoint.push(ip); try { return Reflections.<T> cast(getBeanManager().getReference(bean, getType(), getCreationalContext(), false)); } finally { stack.pop(); } }
private Set<Bean<?>> resolveBeans() { // Perform typesafe resolution, and possibly attempt to resolve the ambiguity Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()) .setDeclaringBean(getInjectionPoint().getBean()).create(); TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver(); return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers()))); }
private Set<Bean<?>> resolveBeans() { // Perform typesafe resolution, and possibly attempt to resolve the ambiguity Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()) .setDeclaringBean(getInjectionPoint().getBean()).create(); TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver(); return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers()))); }
private Set<Bean<?>> resolveBeans() { // Perform typesafe resolution, and possibly attempt to resolve the ambiguity Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()) .setDeclaringBean(getInjectionPoint().getBean()).create(); TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver(); return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers()))); }
private Set<Bean<?>> resolveBeans() { // Perform typesafe resolution, and possibly attempt to resolve the ambiguity Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()) .setDeclaringBean(getInjectionPoint().getBean()).create(); TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver(); return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers()))); }
private Set<Bean<?>> resolveBeans() { // Perform typesafe resolution, and possibly attempt to resolve the ambiguity Resolvable resolvable = new ResolvableBuilder(getType(), getBeanManager()).addQualifiers(getQualifiers()) .setDeclaringBean(getInjectionPoint().getBean()).create(); TypeSafeBeanResolver beanResolver = getBeanManager().getBeanResolver(); return beanResolver.resolve(beanResolver.resolve(resolvable, Reflections.isCacheable(getQualifiers()))); }
private T getBeanInstance(Bean<?> bean) { final ThreadLocalStackReference<InjectionPoint> stack = currentInjectionPoint.pushConditionally(ip, isRegisterableInjectionPoint()); try { return Reflections.<T> cast(getBeanManager().getReference(bean, getType(), getCreationalContext(), false)); } finally { stack.pop(); } }
private T getBeanInstance(Bean<?> bean) { final ThreadLocalStackReference<InjectionPoint> stack = currentInjectionPoint.pushConditionally(ip, isRegisterableInjectionPoint()); try { return Reflections.<T> cast(getBeanManager().getReference(bean, getType(), getCreationalContext(), false)); } finally { stack.pop(); } }
private T getBeanInstance(Bean<?> bean) { final ThreadLocalStackReference<InjectionPoint> stack = currentInjectionPoint.pushConditionally(ip, isRegisterableInjectionPoint()); try { return Reflections.<T> cast(getBeanManager().getReference(bean, getType(), getCreationalContext(), false)); } finally { stack.pop(); } }
private void checkBeanResolved() { if (bean != null) { return; } else if (isUnsatisfied()) { throw BeanManagerLogger.LOG.injectionPointHasUnsatisfiedDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), InjectionPoints.getUnsatisfiedDependenciesAdditionalInfo(ip, getBeanManager())); } else { throw BeanManagerLogger.LOG.injectionPointHasAmbiguousDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), WeldCollections.toMultiRowString(allBeans())); } }
private void checkBeanResolved() { if (bean != null) { return; } else if (isUnsatisfied()) { throw BeanManagerLogger.LOG.injectionPointHasUnsatisfiedDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), InjectionPoints.getUnsatisfiedDependenciesAdditionalInfo(ip, getBeanManager())); } else { throw BeanManagerLogger.LOG.injectionPointHasAmbiguousDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), WeldCollections.toMultiRowString(allBeans())); } }
private void checkBeanResolved() { if (bean != null) { return; } else if (isUnsatisfied()) { throw BeanManagerLogger.LOG.injectionPointHasUnsatisfiedDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), InjectionPoints.getUnsatisfiedDependenciesAdditionalInfo(ip, getBeanManager())); } else { throw BeanManagerLogger.LOG.injectionPointHasAmbiguousDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), WeldCollections.toMultiRowString(allBeans())); } }
private void checkBeanResolved() { if (bean != null) { return; } else if (isUnsatisfied()) { throw BeanManagerLogger.LOG.injectionPointHasUnsatisfiedDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), InjectionPoints.getUnsatisfiedDependenciesAdditionalInfo(ip, getBeanManager())); } else { throw BeanManagerLogger.LOG.injectionPointHasAmbiguousDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), WeldCollections.toMultiRowString(allBeans())); } }
private void checkBeanResolved() { if (bean != null) { return; } else if (isUnsatisfied()) { throw BeanManagerLogger.LOG.injectionPointHasUnsatisfiedDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), InjectionPoints.getUnsatisfiedDependenciesAdditionalInfo(ip, getBeanManager())); } else { throw BeanManagerLogger.LOG.injectionPointHasAmbiguousDependencies(Formats.formatAnnotations(ip.getQualifiers()), Formats.formatInjectionPointType(ip.getType()), WeldCollections.toMultiRowString(allBeans())); } }