assisted-inject Questions
4
Solved
From dagger-discuss@:
I have a class that gets some dependencies from the object graph, and other dependencies from a caller at runtime.
public class ImageDownloader {
// Get these dependencies ...
Redbug asked 2/4, 2014 at 0:28
1
I want to provide some dependency at run time to ViewModel using Hilt. I have followed the solution that was directed by d.android.com this.
@HiltViewModel
public class ViewViewModel extends ViewM...
Diverting asked 4/8, 2021 at 10:15
1
Solved
For ViewModels which has only compile-time dependencies, I use the ViewModelProvider.Factory from Architecture components like following:
class ViewModelFactory<T : ViewModel> @Inject constr...
Brown asked 2/9, 2019 at 6:28
1
Solved
I'm trying to combine this 3 features of Guice: inject, multibinding, generics. I create a prototype of production project, so here it is:
First, this is a little hierarchy for generics(in product...
Handtomouth asked 11/4, 2018 at 8:11
2
Solved
Suppose I have a third party class as follows:
public class MyObject {
@Inject
public MyObject(Foo foo, Bar bar) { ... }
}
Now suppose that I have a factory interface like so:
public interfac...
Refurbish asked 26/6, 2015 at 3:39
1
Solved
I have an issue with the AssistedInject. I followed the instructions on this link
https://github.com/google/guice/wiki/AssistedInject
but when I run my application I get an error:
ERROR [2015-04-...
Photocompose asked 23/4, 2015 at 12:59
1
Solved
my problem boils down to using @Assisted with two string arguments to the factory. The problem is that because Guice treats type as the identification mechanism for parameters, both parameters are ...
Meso asked 8/5, 2014 at 22:45
1
Solved
I have been using google-guice with the assisted inject mechanism for quite some time now. As i am in scala, and just discover scala-guice, i'm interested in using it as well. However i'm confused ...
Hypothyroidism asked 21/12, 2013 at 18:0
1
© 2022 - 2024 — McMap. All rights reserved.