mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 12:59:00 +00:00
#108 Consistent package naming throughout the examples
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.iluwatar.dependency.injection;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user