diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java index 5a7493909b2..c43b9052218 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -153,8 +153,14 @@ public interface BeanFactory { * Return the bean instance that uniquely matches the given object type, if any. * @param requiredType type the bean must match; can be an interface or superclass. * {@literal null} is disallowed. - * @return bean matching required type + *

This method goes into {@link ListableBeanFactory} by-type lookup territory + * but may also be translated into a conventional by-name lookup based on the name + * of the given type. For more extensive retrieval operations across sets of beans, + * use {@link ListableBeanFactory} and/or {@link BeanFactoryUtils}. + * @return an instance of the single bean matching the required type * @throws NoSuchBeanDefinitionException if there is not exactly one matching bean found + * @since 3.0 + * @see ListableBeanFactory */ T getBean(Class requiredType) throws BeansException;