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
diff --git a/core/java/android/annotation/DurationMillisLong.java b/core/java/android/annotation/DurationMillisLong.java
new file mode 100644
index 0000000..ce77532
--- /dev/null
+++ b/core/java/android/annotation/DurationMillisLong.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.annotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * @memberDoc Value is a non-negative duration in milliseconds.
+ * @paramDoc Value is a non-negative duration in milliseconds.
+ * @returnDoc Value is a non-negative duration in milliseconds.
+ * @hide
+ */
+@Retention(SOURCE)
+@Target({METHOD, PARAMETER, FIELD})
+public @interface DurationMillisLong {
+}