From ae877e92c7aede9043433158543ca6dddfc66097 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 30 Mar 2010 15:53:32 +0000 Subject: [PATCH] improved getBean(Class) javadoc --- .../org/springframework/beans/factory/BeanFactory.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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;