diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2017-12-08 17:32:32 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2017-12-08 17:33:40 -0700 |
| commit | 5db9a911354271abdc13a2a645d0de7d2619010e (patch) | |
| tree | cca7ffd53bc9355afa36e96124912a7af62fd90e /core/java/android/annotation/StringDef.java | |
| parent | 6e15c2a89ae9733d2552d9d0a20504a4bdf69c29 (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/StringDef.java')
| -rw-r--r-- | core/java/android/annotation/StringDef.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/annotation/StringDef.java b/core/java/android/annotation/StringDef.java index d5157c3a1562..a37535b9c98e 100644 --- a/core/java/android/annotation/StringDef.java +++ b/core/java/android/annotation/StringDef.java @@ -46,6 +46,11 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; @Retention(SOURCE) @Target({ANNOTATION_TYPE}) public @interface StringDef { + /** Defines the constant prefix for this element */ + String[] prefix() default {}; + /** Defines the constant suffix for this element */ + String[] suffix() default {}; + /** Defines the allowed constants for this element */ String[] value() default {}; } |
