Improve AnnotationLiteral javadoc#657
Conversation
| * | ||
| * <p> | ||
| * An instance of an annotation type may be obtained by subclassing <code>AnnotationLiteral</code>. | ||
| * The subclass must implement the annotation interface to satisfy the {@link Annotation} contract. |
There was a problem hiding this comment.
| * The subclass must implement the annotation interface to satisfy the {@link Annotation} contract. | |
| * The subclass must implement the corresponding annotation interface to satisfy the {@link Annotation} contract. |
There was a problem hiding this comment.
That would actually be incorrect. This refers to the annotation interface for which the AnnotationLiteral is being created. So if I have an annotation type MyAnnotation and I'm creating an AnnotationLiteral for it, the AnnotationLiteral subclass must implement MyAnnotation.
There was a problem hiding this comment.
ah, you were right. I updated the above comments to clarify that. WDYT?
There was a problem hiding this comment.
One thing I could do is replace "annotation interface" with "annotation type", as "annotation type" is used above this sentence. However, "the subclass must implement the annotation type" is not exactly clear in that "implement" means the implements keyword...
There was a problem hiding this comment.
The previous sentence, on the previous line, says
An instance of an annotation type may be obtained by subclassing
AnnotationLiteral.
The sentence that is being added here refers to that annotation type.
There was a problem hiding this comment.
ah, okay. It makes sense! Thanks for your explanation!
Fixes #656