Browse Source

improved getBean(Class) javadoc

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3194 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Juergen Hoeller 16 years ago
parent
commit
d957f8c74c
  1. 10
      org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java

10
org.springframework.beans/src/main/java/org/springframework/beans/factory/BeanFactory.java

@ -1,5 +1,5 @@ @@ -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 { @@ -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
* <p>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> T getBean(Class<T> requiredType) throws BeansException;

Loading…
Cancel
Save