Skip to content

Commit 8158b6f

Browse files
committed
Update postProcessBeforeInstantiation comment on factory methods
Closes gh-22867
1 parent 18f6739 commit 8158b6f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -54,8 +54,9 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
5454
* will be short-circuited. The only further processing applied is the
5555
* {@link #postProcessAfterInitialization} callback from the configured
5656
* {@link BeanPostProcessor BeanPostProcessors}.
57-
* <p>This callback will only be applied to bean definitions with a bean class.
58-
* In particular, it will not be applied to beans with a factory method.
57+
* <p>This callback will be applied to bean definitions with their bean class,
58+
* as well as to factory-method definitions in which case the returned bean type
59+
* will be passed in here.
5960
* <p>Post-processors may implement the extended
6061
* {@link SmartInstantiationAwareBeanPostProcessor} interface in order
6162
* to predict the type of the bean object that they are going to return here.
@@ -66,7 +67,8 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
6667
* or {@code null} to proceed with default instantiation
6768
* @throws org.springframework.beans.BeansException in case of errors
6869
* @see #postProcessAfterInstantiation
69-
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#hasBeanClass
70+
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getBeanClass()
71+
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getFactoryMethodName()
7072
*/
7173
@Nullable
7274
default Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {

0 commit comments

Comments
 (0)