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
This commit is contained in:
Juergen Hoeller 2022-05-12 13:15:08 +02:00
parent f0e23b66f3
commit fc8e6705d6
12 changed files with 16 additions and 15 deletions

View File

@ -58,6 +58,9 @@ import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.InjectionPoint;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.beans.factory.aot.AutowiredArgumentsCodeGenerator;
import org.springframework.beans.factory.aot.AutowiredFieldValueResolver;
import org.springframework.beans.factory.aot.AutowiredMethodArgumentsResolver;
import org.springframework.beans.factory.aot.BeanRegistrationAotContribution;
import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor;
import org.springframework.beans.factory.aot.BeanRegistrationCode;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.lang.reflect.Constructor;
import java.lang.reflect.Executable;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.util.Set;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.lang.reflect.Field;
import java.util.LinkedHashSet;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.lang.reflect.Array;
import java.lang.reflect.Constructor;
@ -69,8 +69,7 @@ import org.springframework.util.function.ThrowingFunction;
* @since 6.0
* @see AutowiredArguments
*/
public final class AutowiredInstantiationArgumentsResolver
extends AutowiredElementResolver {
public final class AutowiredInstantiationArgumentsResolver extends AutowiredElementResolver {
private final ExecutableLookup lookup;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.lang.reflect.Method;
import java.util.Arrays;

View File

@ -30,8 +30,6 @@ import org.springframework.aot.generate.GenerationContext;
import org.springframework.aot.generate.MethodGenerator;
import org.springframework.aot.hint.ExecutableHint;
import org.springframework.aot.hint.ExecutableMode;
import org.springframework.beans.factory.annotation.AutowiredArgumentsCodeGenerator;
import org.springframework.beans.factory.annotation.AutowiredInstantiationArgumentsResolver;
import org.springframework.beans.factory.support.InstanceSupplier;
import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.core.ResolvableType;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.util.ArrayList;
import java.util.List;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.io.InputStream;
import java.lang.annotation.Retention;
@ -38,7 +38,8 @@ import org.junit.jupiter.params.support.AnnotationConsumer;
import org.springframework.beans.factory.BeanCurrentlyInCreationException;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.UnsatisfiedDependencyException;
import org.springframework.beans.factory.annotation.AutowiredInstantiationArgumentsResolverTests.Enclosing.InnerSingleArgConstructor;
import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
import org.springframework.beans.factory.aot.AutowiredInstantiationArgumentsResolverTests.Enclosing.InnerSingleArgConstructor;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder;
import org.springframework.beans.factory.config.DependencyDescriptor;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.beans.factory.annotation;
package org.springframework.beans.factory.aot;
import java.io.InputStream;
import java.util.ArrayList;