Update postProcessBeforeInstantiation comment on factory methods
Closes gh-22867
This commit is contained in:
parent
18f6739be4
commit
8158b6fd86
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
|
|
@ -54,8 +54,9 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
|
|||
* will be short-circuited. The only further processing applied is the
|
||||
* {@link #postProcessAfterInitialization} callback from the configured
|
||||
* {@link BeanPostProcessor BeanPostProcessors}.
|
||||
* <p>This callback will only be applied to bean definitions with a bean class.
|
||||
* In particular, it will not be applied to beans with a factory method.
|
||||
* <p>This callback will be applied to bean definitions with their bean class,
|
||||
* as well as to factory-method definitions in which case the returned bean type
|
||||
* will be passed in here.
|
||||
* <p>Post-processors may implement the extended
|
||||
* {@link SmartInstantiationAwareBeanPostProcessor} interface in order
|
||||
* to predict the type of the bean object that they are going to return here.
|
||||
|
|
@ -66,7 +67,8 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
|
|||
* or {@code null} to proceed with default instantiation
|
||||
* @throws org.springframework.beans.BeansException in case of errors
|
||||
* @see #postProcessAfterInstantiation
|
||||
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#hasBeanClass
|
||||
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getBeanClass()
|
||||
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getFactoryMethodName()
|
||||
*/
|
||||
@Nullable
|
||||
default Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
|
||||
|
|
|
|||
Loading…
Reference in New Issue