Created
August 13, 2019 18:18
-
-
Save brendoncheung/3d512cc2733f0b0c1348fc6b938ab92a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Client { | |
private ServiceA a; | |
private ServiceB b; | |
// Property injection | |
public ServiceC c; | |
// Constructor injection | |
public Client(ServiceA a, ServiceB b) { | |
this.a = a; | |
this.b = b; | |
} | |
// Method injection | |
public setServiceC(ServiceC c) { | |
this.c = c; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment