summaryrefslogtreecommitdiff
path: root/dalvik
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2019-11-29 14:12:12 +0000
committerMathew Inwood <mathewi@google.com>2019-12-02 11:42:16 +0000
commit9c49982e6d07bafe91d39b57c51976d65ccd84ed (patch)
treeb128fdcdf362e6806df2f6543497ff25e5e10655 /dalvik
parent37430be207ee4c3633e784d83745e069751f5b25 (diff)
Add overrideSourcePosition to UnsupportedAppUsage.
This allows tools to know the original source position of the annotation in cases where the java code is generated. It will be populated by the AIDL compiler. Bug: 145120552 Test: m Change-Id: Ie5c1108ccb8417195f09d1ed61be4ce1f1c2282d
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java b/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
index ff3ad4bf72..0932c3388d 100644
--- a/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
+++ b/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
@@ -146,6 +146,20 @@ public @interface UnsupportedAppUsage {
String publicAlternatives() default "";
/**
+ * Override the default source position when generating an index of the annotations.
+ *
+ * <p>This is intended for use by tools that generate java source code, to point to the
+ * original source position of the annotation, rather than the position within the generated
+ * code. It should never be set manually.
+ *
+ * <p>The format of the value is "path/to/file:startline:startcol:endline:endcol" indicating
+ * the position of the annotation itself.
+ */
+ @CorePlatformApi
+ @IntraCoreApi
+ String overrideSourcePosition() default "";
+
+ /**
* Container for {@link UnsupportedAppUsage} that allows it to be applied repeatedly to types.
*/
@Retention(CLASS)