-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve AnnotationLiteral javadoc #657
Improve AnnotationLiteral javadoc #657
Conversation
@@ -38,6 +38,7 @@ | |||
* | |||
* <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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, you were right. I updated the above comments to clarify that. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, okay. It makes sense! Thanks for your explanation!
Fixes #656