summaryrefslogtreecommitdiff
path: root/core/java/android/annotation/IntDef.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2017-12-08 17:32:32 -0700
committerJeff Sharkey <jsharkey@android.com>2017-12-08 17:33:40 -0700
commit5db9a911354271abdc13a2a645d0de7d2619010e (patch)
treecca7ffd53bc9355afa36e96124912a7af62fd90e /core/java/android/annotation/IntDef.java
parent6e15c2a89ae9733d2552d9d0a20504a4bdf69c29 (diff)
Add auto-doc support for @StringDef.
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
Diffstat (limited to 'core/java/android/annotation/IntDef.java')
-rw-r--r--core/java/android/annotation/IntDef.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/annotation/IntDef.java b/core/java/android/annotation/IntDef.java
index 3f9064e4dd73..b49b2c3e2795 100644
--- a/core/java/android/annotation/IntDef.java
+++ b/core/java/android/annotation/IntDef.java
@@ -52,7 +52,9 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
@Target({ANNOTATION_TYPE})
public @interface IntDef {
/** Defines the constant prefix for this element */
- String[] prefix() default "";
+ String[] prefix() default {};
+ /** Defines the constant suffix for this element */
+ String[] suffix() default {};
/** Defines the allowed constants for this element */
long[] value() default {};