improved getBean(Class) javadoc
This commit is contained in:
parent
16305530f2
commit
ae877e92c7
|
|
@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.
|
* 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.
|
* @param requiredType type the bean must match; can be an interface or superclass.
|
||||||
* {@literal null} is disallowed.
|
* {@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
|
* @throws NoSuchBeanDefinitionException if there is not exactly one matching bean found
|
||||||
|
* @since 3.0
|
||||||
|
* @see ListableBeanFactory
|
||||||
*/
|
*/
|
||||||
<T> T getBean(Class<T> requiredType) throws BeansException;
|
<T> T getBean(Class<T> requiredType) throws BeansException;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue