1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -126,13 +126,12 @@ protected SpringFactoriesLoader(@Nullable ClassLoader classLoader, Map<String, L
126
126
* Load and instantiate the factory implementations of the given type from
127
127
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
128
128
* and a default argument resolver that expects a no-arg constructor.
129
- * <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}.
129
+ * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
130
130
* <p>If a custom instantiation strategy is required, use {@code load(...)}
131
131
* with a custom {@link ArgumentResolver ArgumentResolver} and/or
132
132
* {@link FailureHandler FailureHandler}.
133
- * <p>As of Spring Framework 5.3, if duplicate implementation class names are
134
- * discovered for a given factory type, only one instance of the duplicated
135
- * implementation type will be instantiated.
133
+ * <p>If duplicate implementation class names are discovered for a given factory
134
+ * type, only one instance of the duplicated implementation type will be instantiated.
136
135
* @param factoryType the interface or abstract class representing the factory
137
136
* @throws IllegalArgumentException if any factory implementation class cannot
138
137
* be loaded or if an error occurs while instantiating any factory
@@ -146,10 +145,9 @@ public <T> List<T> load(Class<T> factoryType) {
146
145
* Load and instantiate the factory implementations of the given type from
147
146
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
148
147
* and the given argument resolver.
149
- * <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}.
150
- * <p>As of Spring Framework 5.3, if duplicate implementation class names are
151
- * discovered for a given factory type, only one instance of the duplicated
152
- * implementation type will be instantiated.
148
+ * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
149
+ * <p>If duplicate implementation class names are discovered for a given factory
150
+ * type, only one instance of the duplicated implementation type will be instantiated.
153
151
* @param factoryType the interface or abstract class representing the factory
154
152
* @param argumentResolver strategy used to resolve constructor arguments by their type
155
153
* @throws IllegalArgumentException if any factory implementation class cannot
@@ -164,10 +162,9 @@ public <T> List<T> load(Class<T> factoryType, @Nullable ArgumentResolver argumen
164
162
* Load and instantiate the factory implementations of the given type from
165
163
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader
166
164
* with custom failure handling provided by the given failure handler.
167
- * <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}.
168
- * <p>As of Spring Framework 5.3, if duplicate implementation class names are
169
- * discovered for a given factory type, only one instance of the duplicated
170
- * implementation type will be instantiated.
165
+ * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
166
+ * <p>If duplicate implementation class names are discovered for a given factory
167
+ * type, only one instance of the duplicated implementation type will be instantiated.
171
168
* <p>For any factory implementation class that cannot be loaded or error that
172
169
* occurs while instantiating it, the given failure handler is called.
173
170
* @param factoryType the interface or abstract class representing the factory
@@ -183,10 +180,9 @@ public <T> List<T> load(Class<T> factoryType, @Nullable FailureHandler failureHa
183
180
* {@value #FACTORIES_RESOURCE_LOCATION}, using the configured class loader,
184
181
* the given argument resolver, and custom failure handling provided by the given
185
182
* failure handler.
186
- * <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}.
187
- * <p>As of Spring Framework 5.3, if duplicate implementation class names are
188
- * discovered for a given factory type, only one instance of the duplicated
189
- * implementation type will be instantiated.
183
+ * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
184
+ * <p>If duplicate implementation class names are discovered for a given factory
185
+ * type, only one instance of the duplicated implementation type will be instantiated.
190
186
* <p>For any factory implementation class that cannot be loaded or error that
191
187
* occurs while instantiating it, the given failure handler is called.
192
188
* @param factoryType the interface or abstract class representing the factory
@@ -237,12 +233,11 @@ protected <T> T instantiateFactory(String implementationName, Class<T> type,
237
233
/**
238
234
* Load and instantiate the factory implementations of the given type from
239
235
* {@value #FACTORIES_RESOURCE_LOCATION}, using the given class loader.
240
- * <p>The returned factories are sorted through {@link AnnotationAwareOrderComparator}.
241
- * <p>As of Spring Framework 5.3, if duplicate implementation class names are
242
- * discovered for a given factory type, only one instance of the duplicated
243
- * implementation type will be instantiated.
236
+ * <p>The returned factories are sorted using {@link AnnotationAwareOrderComparator}.
237
+ * <p>If duplicate implementation class names are discovered for a given factory
238
+ * type, only one instance of the duplicated implementation type will be instantiated.
244
239
* <p>For more advanced factory loading with {@link ArgumentResolver} or
245
- * {@link FailureHandler} support use {@link #forDefaultResourceLocation(ClassLoader)}
240
+ * {@link FailureHandler} support, use {@link #forDefaultResourceLocation(ClassLoader)}
246
241
* to obtain a {@link SpringFactoriesLoader} instance.
247
242
* @param factoryType the interface or abstract class representing the factory
248
243
* @param classLoader the ClassLoader to use for loading (can be {@code null}
@@ -258,9 +253,8 @@ public static <T> List<T> loadFactories(Class<T> factoryType, @Nullable ClassLoa
258
253
* Load the fully qualified class names of factory implementations of the
259
254
* given type from {@value #FACTORIES_RESOURCE_LOCATION}, using the given
260
255
* class loader.
261
- * <p>As of Spring Framework 5.3, if a particular implementation class name
262
- * is discovered more than once for the given factory type, duplicates will
263
- * be ignored.
256
+ * <p>If a particular implementation class name is discovered more than once
257
+ * for the given factory type, duplicates will be ignored.
264
258
* @param factoryType the interface or abstract class representing the factory
265
259
* @param classLoader the ClassLoader to use for loading resources; can be
266
260
* {@code null} to use the default
0 commit comments