Skip to content

Instantly share code, notes, and snippets.

@MaksimDmitriev
Created June 26, 2018 05:28
Show Gist options
  • Select an option

  • Save MaksimDmitriev/9ebbd0742c0227fc2a72d0afc23f5bb5 to your computer and use it in GitHub Desktop.

Select an option

Save MaksimDmitriev/9ebbd0742c0227fc2a72d0afc23f5bb5 to your computer and use it in GitHub Desktop.
// generated code!
public final class Bar$$Factory implements Factory<Bar> {
private MemberInjector<Bar> memberInjector = new ru.maksim.twitterstrsample.Bar$$MemberInjector();
@Override
public Bar createInstance(Scope scope) {
scope = getTargetScope(scope);
Bar bar = new Bar();
memberInjector.inject(bar, scope);
return bar;
}
@Override
public Scope getTargetScope(Scope scope) {
return scope;
}
@Override
public boolean hasScopeAnnotation() {
return false;
}
@Override
public boolean hasProvidesSingletonInScopeAnnotation() {
return false;
}
}
package ru.maksim.sample
import android.util.Log
import javax.inject.Inject
class Bar {
@Inject lateinit var foo : Foo
fun print() {
Log.d("90210", "print foo=$foo")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment