Skip to content

Commit fc8e670

Browse files
committed
Move AutowiredArguments support classes to beans.factory.aot
This reduces the package cycle between aot and annotation to an Autowired annotation reference in ConstructorOrFactoryMethodResolver, to be resolved along with gh-27920. See gh-28414
1 parent f0e23b6 commit fc8e670

12 files changed

+16
-15
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
import org.springframework.beans.factory.InjectionPoint;
5959
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
6060
import org.springframework.beans.factory.UnsatisfiedDependencyException;
61+
import org.springframework.beans.factory.aot.AutowiredArgumentsCodeGenerator;
62+
import org.springframework.beans.factory.aot.AutowiredFieldValueResolver;
63+
import org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver;
6164
import org.springframework.beans.factory.aot.BeanRegistrationAotContribution;
6265
import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor;
6366
import org.springframework.beans.factory.aot.BeanRegistrationCode;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import org.springframework.lang.Nullable;
2020
import org.springframework.util.Assert;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.lang.reflect.Constructor;
2020
import java.lang.reflect.Executable;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.util.Set;
2020

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.lang.reflect.Field;
2020
import java.util.LinkedHashSet;
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.lang.reflect.Array;
2020
import java.lang.reflect.Constructor;
@@ -69,8 +69,7 @@
6969
* @since 6.0
7070
* @see AutowiredArguments
7171
*/
72-
public final class AutowiredInstantiationArgumentsResolver
73-
extends AutowiredElementResolver {
72+
public final class AutowiredInstantiationArgumentsResolver extends AutowiredElementResolver {
7473

7574
private final ExecutableLookup lookup;
7675

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.lang.reflect.Method;
2020
import java.util.Arrays;

spring-beans/src/main/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGenerator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import org.springframework.aot.generate.MethodGenerator;
3131
import org.springframework.aot.hint.ExecutableHint;
3232
import org.springframework.aot.hint.ExecutableMode;
33-
import org.springframework.beans.factory.annotation.AutowiredArgumentsCodeGenerator;
34-
import org.springframework.beans.factory.annotation.AutowiredInstantiationArgumentsResolver;
3533
import org.springframework.beans.factory.support.InstanceSupplier;
3634
import org.springframework.beans.factory.support.RegisteredBean;
3735
import org.springframework.core.ResolvableType;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.lang.reflect.Constructor;
2020
import java.lang.reflect.Method;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.io.InputStream;
2020
import java.lang.annotation.Retention;
@@ -38,7 +38,8 @@
3838
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
3939
import org.springframework.beans.factory.ObjectProvider;
4040
import org.springframework.beans.factory.UnsatisfiedDependencyException;
41-
import org.springframework.beans.factory.annotation.AutowiredInstantiationArgumentsResolverTests.Enclosing.InnerSingleArgConstructor;
41+
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
42+
import org.springframework.beans.factory.aot.AutowiredInstantiationArgumentsResolverTests.Enclosing.InnerSingleArgConstructor;
4243
import org.springframework.beans.factory.config.BeanDefinition;
4344
import org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder;
4445
import org.springframework.beans.factory.config.DependencyDescriptor;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.beans.factory.annotation;
17+
package org.springframework.beans.factory.aot;
1818

1919
import java.io.InputStream;
2020
import java.util.ArrayList;

0 commit comments

Comments
 (0)