/** * Override that looks to see if there is only one component adapter with a class as the * key since Providers and qualifiers will automatically have a string value. */ @Override protected <T> ComponentAdapter<T> sortThroughTooManyAdapters(final Generic<T> expectedType, final List<ComponentAdapter<T>> found) { ComponentAdapter<T> lastAdapterWithClassKey = null; for (ComponentAdapter<T> eachAdapter : found) { if (eachAdapter.getComponentKey() instanceof Class<?>) { //More than one found, bail. if (lastAdapterWithClassKey != null) { lastAdapterWithClassKey = null; break; } lastAdapterWithClassKey = eachAdapter; } } if (lastAdapterWithClassKey == null) { lastAdapterWithClassKey = checkForMatchingGenericParameterTypes(expectedType, found); } return lastAdapterWithClassKey; }
returnValue[i] = new JSR330ComponentParameter(namedAnnotation.value()); } else { Annotation qualifier = JSR330PicoContainer.getQualifier(allAnnotations[i]); if (qualifier != null) { returnValue[i] = new JSR330ComponentParameter(qualifier.annotationType().getName());
returnValue[i] = new JSR330ComponentParameter(namedAnnotation.value()); } else { Annotation qualifier = JSR330PicoContainer.getQualifier(allAnnotations[i]); if (qualifier != null) { returnValue[i] = new JSR330ComponentParameter(qualifier.annotationType().getName());
/** * Override that looks to see if there is only one component adapter with a class as the * key since Providers and qualifiers will automatically have a string value. */ @Override protected <T> ComponentAdapter<T> sortThroughTooManyAdapters(final Generic<T> expectedType, final List<ComponentAdapter<T>> found) { ComponentAdapter<T> lastAdapterWithClassKey = null; for (ComponentAdapter<T> eachAdapter : found) { if (eachAdapter.getComponentKey() instanceof Class<?>) { //More than one found, bail. if (lastAdapterWithClassKey != null) { lastAdapterWithClassKey = null; break; } lastAdapterWithClassKey = eachAdapter; } } if (lastAdapterWithClassKey == null) { lastAdapterWithClassKey = checkForMatchingGenericParameterTypes(expectedType, found); } return lastAdapterWithClassKey; }