Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.DependencyDescriptor.increaseNestingLevel()


    }

    if (type.isArray()) {
      Class<?> componentType = type.getComponentType();
      DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor);
      targetDesc.increaseNestingLevel();
      Map<String, Object> matchingBeans = findAutowireCandidates(beanName, componentType, targetDesc);
      if (matchingBeans.isEmpty()) {
        if (descriptor.isRequired()) {
          raiseNoSuchBeanDefinitionException(componentType, "array of " + componentType.getName(), descriptor);
        }
View Full Code Here


          throw new FatalBeanException("No element type declared for collection [" + type.getName() + "]");
        }
        return null;
      }
      DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor);
      targetDesc.increaseNestingLevel();
      Map<String, Object> matchingBeans = findAutowireCandidates(beanName, elementType, targetDesc);
      if (matchingBeans.isEmpty()) {
        if (descriptor.isRequired()) {
          raiseNoSuchBeanDefinitionException(elementType, "collection of " + elementType.getName(), descriptor);
        }
View Full Code Here

          throw new FatalBeanException("No value type declared for map [" + type.getName() + "]");
        }
        return null;
      }
      DependencyDescriptor targetDesc = new DependencyDescriptor(descriptor);
      targetDesc.increaseNestingLevel();
      Map<String, Object> matchingBeans = findAutowireCandidates(beanName, valueType, targetDesc);
      if (matchingBeans.isEmpty()) {
        if (descriptor.isRequired()) {
          raiseNoSuchBeanDefinitionException(valueType, "map with value type " + valueType.getName(), descriptor);
        }
View Full Code Here

        @Override
        public boolean isRequired() {
          return false;
        }
      };
      descriptorToUse.increaseNestingLevel();
      return Optional.ofNullable(doResolveDependency(descriptorToUse, beanName, null, null));
    }
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.