aboutsummaryrefslogtreecommitdiff
path: root/java/dagger/internal/IdentifierNameString.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/dagger/internal/IdentifierNameString.java')
-rw-r--r--java/dagger/internal/IdentifierNameString.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/java/dagger/internal/IdentifierNameString.java b/java/dagger/internal/IdentifierNameString.java
new file mode 100644
index 000000000..95d2bfa6f
--- /dev/null
+++ b/java/dagger/internal/IdentifierNameString.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 The Dagger Authors.
+ *
+ * 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 dagger.internal;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.CLASS;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotates the dagger generated class that requires applying -identifiernamestring rule.
+ *
+ * <p>When applied, all the strings fields that corresponds to a class name within the annotated
+ * class will be obfuscated if its corresponding class is obfuscated. This only works with r8.
+ *
+ */
+@Documented
+@Retention(CLASS)
+@Target(TYPE)
+public @interface IdentifierNameString {}