mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-11 18:12:57 +00:00
Reformat business-delegate, callback, chain, command, composite, dao, decorator & dependency-injection patterns.
This commit is contained in:
1 parent
3af06a3a3a
commit
449340bd2b
54 files changed
+698
-700
No files matched your search
+8
-8
@@ -2,15 +2,15 @@ package com.iluwatar.dependency.injection;
|
||||
|
||||
/**
|
||||
*
|
||||
* Naive Wizard implementation violating the inversion of control principle.
|
||||
* It should depend on abstraction instead.
|
||||
* Naive Wizard implementation violating the inversion of control principle. It should depend on
|
||||
* abstraction instead.
|
||||
*
|
||||
*/
|
||||
public class SimpleWizard implements Wizard {
|
||||
|
||||
private OldTobyTobacco tobacco = new OldTobyTobacco();
|
||||
|
||||
public void smoke() {
|
||||
tobacco.smoke(this);
|
||||
}
|
||||
|
||||
private OldTobyTobacco tobacco = new OldTobyTobacco();
|
||||
|
||||
public void smoke() {
|
||||
tobacco.smoke(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user