Finished the example.
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
package com.iluwatar;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
public class App {
|
||||
|
||||
public static void main( String[] args ) {
|
||||
@ -8,5 +11,9 @@ public class App {
|
||||
|
||||
AdvancedWizard advancedWizard = new AdvancedWizard(new SecondBreakfastTobacco());
|
||||
advancedWizard.smoke();
|
||||
|
||||
Injector injector = Guice.createInjector(new TobaccoModule());
|
||||
GuiceWizard guiceWizard = injector.getInstance(GuiceWizard.class);
|
||||
guiceWizard.smoke();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user