xref: /aosp_15_r20/external/dagger2/java/dagger/android/internal/AndroidInjectionKeys.java (revision f585d8a307d0621d6060bd7e80091fdcbf94fe27)
1 /*
2  * Copyright (C) 2018 The Dagger Authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package dagger.android.internal;
18 
19 /**
20  * An internal implementation detail of Dagger's generated code. This is not guaranteed to remain
21  * consistent from version to version.
22  */
23 @GenerateAndroidInjectionProguardRules
24 public final class AndroidInjectionKeys {
25   /**
26    * Accepts the fully qualified name of a class that is injected with {@code dagger.android}.
27    *
28    * <p>From a runtime perspective, this method does nothing except return its single argument. It
29    * is used as a signal to bytecode shrinking tools that its argument should be rewritten if it
30    * corresponds to a class that has been obfuscated/relocated. Once it is done so, it is expected
31    * that the argument will be inlined and this method will go away.
32    */
of(String mapKey)33   public static String of(String mapKey) {
34     return mapKey;
35   }
36 
AndroidInjectionKeys()37   private AndroidInjectionKeys() {}
38 }
39