|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2016 the original author or authors. |
| 2 | + * Copyright 2002-2017 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.
|
|
24 | 24 |
|
25 | 25 | /**
|
26 | 26 | * Indicate that the annotated element represents a stereotype for the index.
|
27 |
| - * <p> |
28 |
| - * The {@code CandidateComponentsIndex} is an alternative to classpath |
| 27 | + * |
| 28 | + * <p>The {@code CandidateComponentsIndex} is an alternative to classpath |
29 | 29 | * scanning that uses a metadata file generated at compilation time. The
|
30 | 30 | * index allows retrieving the candidate components (i.e. fully qualified
|
31 | 31 | * name) based on a stereotype. This annotation instructs the generator to
|
32 | 32 | * index the element on which the annotated element is present or if it
|
33 | 33 | * implements or extends from the annotated element. The stereotype is the
|
34 | 34 | * fully qualified name of the annotated element.
|
35 |
| - * <p> |
36 |
| - * Consider the default {@link Component} annotation that is meta-annotated |
| 35 | + * |
| 36 | + * <p>Consider the default {@link Component} annotation that is meta-annotated |
37 | 37 | * with this annotation. If a component is annotated with {@link Component},
|
38 | 38 | * an entry for that component will be added to the index using the
|
39 | 39 | * {@code org.springframework.stereotype.Component} stereotype.
|
40 |
| - * <p> |
41 |
| - * This annotation is also honored on meta-annotations. Consider this |
| 40 | + * |
| 41 | + * <p>This annotation is also honored on meta-annotations. Consider this |
42 | 42 | * custom annotation:
|
43 | 43 | * <pre class="code">
|
44 | 44 | * package com.example;
|
|
50 | 50 | * @Service
|
51 | 51 | * public @interface PrivilegedService { ... }
|
52 | 52 | * </pre>
|
53 |
| - * If this annotation is present on an type, it will be indexed with two |
| 53 | + * |
| 54 | + * If the above annotation is present on a type, it will be indexed with two |
54 | 55 | * stereotypes: {@code org.springframework.stereotype.Component} and
|
55 | 56 | * {@code com.example.PrivilegedService}. While {@link Service} isn't directly
|
56 | 57 | * annotated with {@code Indexed}, it is meta-annotated with {@link Component}.
|
57 |
| - * <p> |
58 |
| - * It is also possible to index all implementations of a certain interface or |
59 |
| - * all the sub-classes of a given class by adding {@code @Indexed} on it. |
| 58 | + * |
| 59 | + * <p>It is also possible to index all implementations of a certain interface or |
| 60 | + * all the subclasses of a given class by adding {@code @Indexed} on it. |
| 61 | + * |
60 | 62 | * Consider this base interface:
|
61 | 63 | * <pre class="code">
|
62 | 64 | * package com.example;
|
63 | 65 | *
|
64 | 66 | * @Indexed
|
65 | 67 | * public interface AdminService { ... }
|
66 | 68 | * </pre>
|
| 69 | + * |
67 | 70 | * Now, consider an implementation of this {@code AdminService} somewhere:
|
68 | 71 | * <pre class="code">
|
69 | 72 | * package com.example.foo;
|
|
72 | 75 | *
|
73 | 76 | * public class ConfigurationAdminService implements AdminService { ... }
|
74 | 77 | * </pre>
|
| 78 | + * |
75 | 79 | * Because this class implements an interface that is indexed, it will be
|
76 | 80 | * automatically included with the {@code com.example.AdminService} stereotype.
|
77 |
| - * If there are more {@code @Indexed} interfaces and/or super classes in the |
| 81 | + * If there are more {@code @Indexed} interfaces and/or superclasses in the |
78 | 82 | * hierarchy, the class will map to all their stereotypes.
|
79 | 83 | *
|
80 | 84 | * @author Stephane Nicoll
|
81 |
| - * @since 4.3.3 |
| 85 | + * @since 5.0 |
82 | 86 | */
|
83 | 87 | @Target(ElementType.TYPE)
|
84 | 88 | @Retention(RetentionPolicy.RUNTIME)
|
|
0 commit comments