Skip to content

Instantly share code, notes, and snippets.

@dhinojosa
Created December 17, 2011 07:17
Show Gist options
  • Save dhinojosa/1489551 to your computer and use it in GitHub Desktop.
Save dhinojosa/1489551 to your computer and use it in GitHub Desktop.
More stuff.
@Scope(Non-Singleton)
class A {
@Inject()
public void setB(B b) {...}
}
@Scope(Non-Singleton)
class B {
@Inject public void setC(C c) {...}
}
@Scope(Non-Singleton)
class C {
@Inject public void setConfigure(Configure configure) {...}
}
@Scope(Non-Singleton)
class Configure {...}
@Scope(Singleton)
class ConfigureFactory {
@Inject public void setConfigure(Configure configure)
public Configure createInstance() {
return configure;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment