I have the following class :
class ClassWithInjectedConstructor @Inject constructor(private val simpleInjectedObject: SimpleInjectedObject) : ClassWhichThisInheritsFrom() {
override fun check(): int {
val result = simpleInjectedObject.methodToCall() // Returns an int.
return 1;
}
}
Please ignore that this function doesn't do anything except return the value on 1.
I am trying to get a handle on how the hell I work with this class, and it's injected constructor.
In my main application class (This class is java, not kotlin), I need to use the class above... and this is how I am trying to do it :
final ClassWithInjectedConstructor instance = new ClassWithInjectedInstructor();
I am aware that I need to pass something into that constructor, but how? If it is injected, do I need some fancy syntax?