I'm using assisted inject a fair bit, and I wonder...
# announcements
g
I'm using assisted inject a fair bit, and I wonder if I should start replacing the myriad of java classes
Copy code
public interface ComponentFactory{
  public Component create(RuntimeDep1 dep1, RuntimeDep2 dep2);
}
with
Copy code
interface ComponentFactory{
  operator fun invoke(dep1: RuntimeDep1 , dep2: RuntimeDep2): Component;
}
which changes my runtime code to
Copy code
@Inject val factory: ComponentFactory;
//...
val provisionedSubcomponent = factory(dep1, dep2)