Annotate java.lang.Class.
You can see the source files with the annotations in
https://android-review.googlesource.com/c/platform/libcore/+/701244
(which obviously is not intended for submission). The .jaif changes
here were copy-and-pasted from the results of running the
extract-annotations tool on those sources.
Most of these follow straightforwardly from the javadoc. (For the
annotation methods, see the javadoc on the AnnotatedElement
interface.)
There are some places where this change makes generalizations. For
example: getMethod documents that its parameterTypes argument may be
null (i.e. a null array); getConstructor doesn't specify this in its
javadoc, but the implementation behaves the same as getMethod's; this
change assumes that both are therefore @Nullable. (It's also not
documented that it should throw if it's a non-null array containing
nulls, but this seems logical, and is true by implementation, so this
change requires that the array contents are @NonNull.)
Test: make docs
Bug: 64930165
Change-Id: I4d1a23a066fb08319b5bae745a5aff05345e01d6
2 files changed