Package javax.enterprise.inject

Examples of javax.enterprise.inject.UnsatisfiedResolutionException


                Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(model.getInjectionGenericType(), bindingAnns);
                producerComponent = (XMLProducerBean<?>) set.iterator().next();

                if (producerComponent == null)
                {
                    throw new UnsatisfiedResolutionException(errorMessage + "Producer method component of the disposal method : "
                                                             + disposalMethod.getName() + "is not found");
                }

                producerComponent.setDisposalMethod(disposalMethod);
View Full Code Here



            Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(type, annot);
            if (set.isEmpty())
            {
                throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() +
                              " in class : " + clazz.getName() + ". Cannot find bean " + type + " with qualifier " + Arrays.toString(annot));
            }
           
            Bean<?> bean = set.iterator().next();
            ProducerMethodBean<?> pr = null;

            if (bean == null || !(bean instanceof ProducerMethodBean))
            {
                throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() + " in class : "
                                                         + clazz.getName() + "is not found");
            }

            else
            {
View Full Code Here

            if (injectionPoint != null)
            {
                message.append(" for injection into " + injectionPoint.toString());
            }
           
            throw new UnsatisfiedResolutionException(message.toString());
        }

        if (resolvedSet.size() > 1)
        {
            throw new AmbiguousResolutionException("There is more than one api type with : " + type.getName() + " with qualifiers : " + qualifierMessage);
View Full Code Here

                Annotation[] annot = AnnotationUtil.getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(annotatedMethod, Disposes.class);

                Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(type, annot);
                if (set.isEmpty())
                {
                    throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() +
                                  " in class : " + declaredMethod.getDeclaringClass().getName() + ". Cannot find bean " + type + " with qualifier "
                                  + Arrays.toString(annot));
                }
               
                Bean<?> foundBean = set.iterator().next();
                ProducerMethodBean<?> pr = null;

                if (foundBean == null || !(foundBean instanceof ProducerMethodBean))
                {
                    throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() + " in class : "
                                                             + annotatedMethod.getDeclaringType().getJavaClass() + "is not found");
                }

                pr = (ProducerMethodBean<?>) foundBean;
View Full Code Here

            Annotation[] annot = AnnotationUtil.getMethodFirstParameterQualifierWithGivenAnnotation(declaredMethod, Disposes.class);


            Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(type, annot);
            if (set.isEmpty()) {
                throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() +
                              " in class : " + clazz.getName() + ". Cannot find bean " + type + " with qualifier " + Arrays.toString(annot));
            }
           
            Bean<?> bean = set.iterator().next();
            ProducerMethodBean<?> pr = null;

            if (bean == null || !(bean instanceof ProducerMethodBean))
            {
                throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() + " in class : " + clazz.getName() + "is not found");
            }

            else
            {
                pr = (ProducerMethodBean<?>) bean;
View Full Code Here

            if (injectionPoint != null)
            {
                message.append(" for injection into " + injectionPoint.toString());
            }
           
            throw new UnsatisfiedResolutionException(message.toString());
        }

        if (resolvedSet.size() > 1)
        {
            throw new AmbiguousResolutionException("There is more than one api type with : " + type.getName() + " with qualifiers : " + qualifierMessage);
View Full Code Here

                Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(model.getInjectionGenericType(), bindingAnns);
                producerComponent = (XMLProducerBean<?>) set.iterator().next();

                if (producerComponent == null)
                {
                    throw new UnsatisfiedResolutionException(errorMessage + "Producer method component of the disposal method : " + disposalMethod.getName() + "is not found");
                }

                producerComponent.setDisposalMethod(disposalMethod);

            }
View Full Code Here

                Type type = AnnotationUtil.getAnnotatedMethodFirstParameterWithAnnotation(annotatedMethod, Disposes.class);
                Annotation[] annot = AnnotationUtil.getAnnotatedMethodFirstParameterQualifierWithGivenAnnotation(annotatedMethod, Disposes.class);

                Set<Bean<?>> set = InjectionResolver.getInstance().implResolveByType(type, annot);
                if (set.isEmpty()) {
                    throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() +
                                  " in class : " + declaredMethod.getDeclaringClass().getName() + ". Cannot find bean " + type + " with qualifier " + Arrays.toString(annot));
                }
               
                Bean<?> foundBean = set.iterator().next();
                ProducerMethodBean<?> pr = null;

                if (foundBean == null || !(foundBean instanceof ProducerMethodBean))
                {
                    throw new UnsatisfiedResolutionException("Producer method component of the disposal method : " + declaredMethod.getName() + " in class : " + annotatedMethod.getDeclaringType().getJavaClass() + "is not found");
                }

                pr = (ProducerMethodBean<?>) foundBean;

                if (previous == null)
View Full Code Here

        ViolationMessageBuilder violationMessage = newViolation(createProducerMethodMessage(producerMethod));

        violationMessage.append(" in class: ", ClassUtil.getClass(type).getName());
        violationMessage.addLine(createQualifierMessage(qualifiers));

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here

        if (injectionPoint != null)
        {
            violationMessage.addLine("for injection into ", injectionPoint.toString());
        }

        throw new UnsatisfiedResolutionException(violationMessage.toString());
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.inject.UnsatisfiedResolutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.