diff --git a/spring-context/src/main/java/org/springframework/context/index/CandidateComponentsIndex.java b/spring-context/src/main/java/org/springframework/context/index/CandidateComponentsIndex.java index 492fb4fb8f7..9b176cd85f9 100644 --- a/spring-context/src/main/java/org/springframework/context/index/CandidateComponentsIndex.java +++ b/spring-context/src/main/java/org/springframework/context/index/CandidateComponentsIndex.java @@ -29,7 +29,9 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** - * Provide access to the candidates that are defined in {@code META-INF/spring.components}. + * Provide access to the candidates that are defined in {@code META-INF/spring.components} + * component index files (see {@link #CandidateComponentsIndex(List)}) or registered + * programmatically (see {@link #CandidateComponentsIndex()}). * *
An arbitrary number of stereotypes can be registered (and queried) on the index: a * typical example is the fully qualified name of an annotation that flags the class for @@ -42,7 +44,7 @@ import org.springframework.util.MultiValueMap; * *
The {@code type} is usually the fully qualified name of a class, though this is
* not a rule. Similarly, the {@code stereotype} is usually the fully qualified name of
- * a target type but it can be any marker really.
+ * an annotation type, but it can be any marker really.
*
* @author Stephane Nicoll
* @author Juergen Hoeller
@@ -60,7 +62,7 @@ public class CandidateComponentsIndex {
/**
- * Create a new index instance from parsed components index files.
+ * Create a new index instance from parsed component index files.
*/
CandidateComponentsIndex(List Note that the containing packages for candidates are not automatically
+ * considered scanned packages. Make sure to call {@link #registerScan(String...)}
+ * with the scan-specific base package accordingly.
* @since 7.0
+ * @see #registerScan(String...)
*/
public void registerCandidateType(String type, String... stereotypes) {
for (String stereotype : stereotypes) {
@@ -120,7 +131,7 @@ public class CandidateComponentsIndex {
}
/**
- * Return the registered stereotypes packages (or base package patterns).
+ * Return the registered stereotype packages (or base package patterns).
* @since 7.0
*/
public Set