From 5fb06de2030a9ae1f3387214c2438f6e90f362ea Mon Sep 17 00:00:00 2001 From: Wolfgang Meyers Date: Tue, 31 May 2016 15:37:50 -0700 Subject: [PATCH] Allow @RequestScope on methods By default, a provider method is invoked each time a provided object is injected. This allows provider methods in dagger modules to provide request-scoped objects. For more details see: https://guides.codepath.com/android/Dependency-Injection-with-Dagger-2#scopes ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123691175 --- java/google/registry/request/RequestScope.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/google/registry/request/RequestScope.java b/java/google/registry/request/RequestScope.java index 7b9122054..d29978bba 100644 --- a/java/google/registry/request/RequestScope.java +++ b/java/google/registry/request/RequestScope.java @@ -25,6 +25,6 @@ import javax.inject.Scope; /** Dagger annotation for request-scoped components that depend on a global component. */ @Scope @Documented -@Target({ElementType.TYPE}) +@Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface RequestScope {}