forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor]: Move
ProvisionMethods#create()
/`InjectionSiteMethods#cr…
…eate()` into the generator that uses it. Note: this CL shouldn't cause any changes to the generated code. `FactoryGenerator` is the only class that uses `ProvisionMethods#create()`, and `MembersInjectorGenerator` is the only class that uses `InjectionSiteMethods#create()`. Thus, I'm moving these methods into these classes for better encapsulation. This will also make the XPoet migration easier since I plan to migrate `FactoryGenerator` and `MembersInjectorGenerator` separately. Note that these methods were sharing some logic that now needs to be duplicated, but IMO this creates more readable code since we're no longer entangling the two use cases. For example, now that `ProvisionMethods` and `InjectionSiteMethods` define their own versions of `methodProxy()` method, we no longer need the multiple enums (i.e. `InstanceCastPolicy` and `CheckNotNullPolicy`) as input to these methods. RELNOTES=N/A PiperOrigin-RevId: 700035303
- Loading branch information
Showing
4 changed files
with
262 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.