Reformat business-delegate, callback, chain, command, composite, dao, decorator & dependency-injection patterns.

This commit is contained in:
Ankur Kaushal
2015-11-01 18:48:43 -05:00
parent 3af06a3a3a
commit 449340bd2b
54 changed files with 698 additions and 700 deletions
@@ -4,22 +4,21 @@ import javax.inject.Inject;
/**
*
* GuiceWizard implements inversion of control.
* Its dependencies are injected through its constructor
* by Guice framework.
* GuiceWizard implements inversion of control. Its dependencies are injected through its
* constructor by Guice framework.
*
*/
public class GuiceWizard implements Wizard {
private Tobacco tobacco;
@Inject
public GuiceWizard(Tobacco tobacco) {
this.tobacco = tobacco;
}
@Override
public void smoke() {
tobacco.smoke(this);
}
private Tobacco tobacco;
@Inject
public GuiceWizard(Tobacco tobacco) {
this.tobacco = tobacco;
}
@Override
public void smoke() {
tobacco.smoke(this);
}
}