aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhi Dou <zhidou@google.com>2024-04-03 13:32:11 +0000
committerAndroid Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com>2024-04-03 13:32:11 +0000
commit0232989938fef9a43e830058836686306f392503 (patch)
tree1c26c1b45a33e07a14c782f413ff4a7e158bf4b7
parent7b7a55137db501fcfe36ef9389d80cbdad6c40f9 (diff)
downloadmodules-utils-0232989938fef9a43e830058836686306f392503.tar.gz
prototype AconfigFlagAccessor annotation
Bug: n/a Test: presubmit Ignore-AOSP-First: will chery pick to aosp (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0f145c1062316db8fa5bc50ce5dda44163f39b41) Merged-In: I0b567710d6e8202da46e2ec27ea1bac2cba9b800 Change-Id: I0b567710d6e8202da46e2ec27ea1bac2cba9b800
-rw-r--r--java/com/android/aconfig/annotations/AconfigFlagAccessor.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/java/com/android/aconfig/annotations/AconfigFlagAccessor.java b/java/com/android/aconfig/annotations/AconfigFlagAccessor.java
new file mode 100644
index 0000000..12ab0f1
--- /dev/null
+++ b/java/com/android/aconfig/annotations/AconfigFlagAccessor.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2024 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 com.android.aconfig.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Denotes that the annotated method is a flag accessor.
+ * <p>
+ * Example:
+ * <pre><code>
+ * &#64;AconfigFlagAccessor
+ * public void foo() {
+ * ...
+ * }
+ * </code></pre>
+ * <p>
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target({METHOD})
+public @interface AconfigFlagAccessor {
+}