6503bd8e33dbf6e8357256d43c6e1158e32a0268 |
|
20-Apr-2017 |
Jeff Sharkey <jsharkey@android.com> |
Auto-generate docs based on annotations. 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
/frameworks/base/core/java/android/annotation/NonNull.java
|
bbc75f34e6b43c8310fb1deff02b0508acdf9659 |
|
17-Dec-2013 |
Tor Norbye <tnorbye@google.com> |
Hide NonNull and Nullable. These should not be used in app code; instead, we will add class-file retention versions of these to the support library. Change-Id: I13275bd28529f5da04d923688655be35c77dbb1c
/frameworks/base/core/java/android/annotation/NonNull.java
|
831c5df6035b84bfcb3242c5c0a39acd7e3fd1b5 |
|
31-May-2013 |
Tor Norbye <tnorbye@google.com> |
Add @NotNull, @Nullable, and @IntDef/@StringDef annotations 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
/frameworks/base/core/java/android/annotation/NonNull.java
|