summaryrefslogtreecommitdiff
path: root/core/java/android/annotation/IntDef.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove annotations that have been relocatedChris Wailes2021-04-261-64/+0
| | | | | | | | | These annotations have been relocated to frameworks/libs/modules-utils. This CL removes the files and updates necessary build rules. Bug: 183133670 Test: m Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
* Merge "Add auto-doc support for @StringDef."Jeff Sharkey2017-12-111-1/+3
|\
| * Add auto-doc support for @StringDef.Jeff Sharkey2017-12-081-1/+3
| | | | | | | | | | | | | | | | | | Behaves pretty much the same as @IntDef, but now supports "suffix" in addition to "prefix" when matching constants. Test: manual docs output looks sane Bug: 70406696 Change-Id: I35064b0f9f36f1f13ccdb40302d818a004014f15
* | Switch @IntDef from long to int, and add @LongDefTor Norbye2017-12-081-1/+1
|/ | | | | | | | | | | | This CL mirrors changes made to the android.support.annotation version of IntDef, to keep the usage and semantics identical (though the internal version of @IntDef and @LongDef are of course hidden and not part of the SDK.) Test: These annotations have source retention and therefore have no runtime impact; the change was compiling the SDK. Change-Id: Idaf47e8d983c88be1bd8f938615c86611014b45a
* @IntDef and @StringDef must have source retentionTor Norbye2017-05-121-2/+2
| | | | | | | | | | | They reference constant references, not constant values, and this cannot be expressed in the .class file for annotations; the data is instead extracted at build time into external annotation data files. Test: Manual Change-Id: I06b366ba8815d1da40e6cbf906ebae09899c1b8e
* Auto-generate docs based on annotations.Jeff Sharkey2017-04-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | We have a handful of annotations that we've been sprinkling across the platform APIs, such as @Nullable, @NonNull, @IntDef, etc. It would be really helpful to surface these contracts to developers through the SDK docs. This change allows annotations like those mentioned above to declare the following new javadoc fields: @memberDoc: docs to append to a field or method definition. @paramDoc: docs to append to a @param definition. @returnDoc: docs to append to a @return definition. This change also builds a docstring to describe the list of all constants listed in an @IntDef annotation. Sadly AnnotationDesc only passes along raw constant values, so we need the help of the new "prefix" annotation argument to help find the field names. Test: builds Bug: 37526420 Change-Id: I4cfc00dd904e5dfa945b406d546e36846b7c0c28
* Fix @IntDef annotation javadocTor Norbye2016-01-121-1/+1
| | | | Change-Id: I1a4fc4a1a731fc8732279950dcd8416ab125aed3
* Fix @code escapesNeil Fuller2015-12-021-10/+9
| | | | | | | | | The body of {@code} must not be HTML escaped. This is one of several changes that fix the source in conjunction with a doclava fix. Bug: 25757239 Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-5/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Add @NotNull, @Nullable, and @IntDef/@StringDef annotationsTor Norbye2013-08-151-0/+65
This changeset adds some annotations for recording whether a method return value or method parameter can be null (@Nullable), can never be null (@NotNull), or must be an integer enum or flag using one of the given constants. Change-Id: Ic932592ea3bac781c1df364447c57042461333c5