Skip to content
Snippets Groups Projects
Commit f6da0d96 authored by Peter Hertkorn's avatar Peter Hertkorn
Browse files

Interface injection instead of constructor injection

parent 6c3d3d79
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,9 @@ package pizzeria;
import com.google.inject.Inject;
public class PizzaFranchise {
private PizzaStore store;
@Inject
public PizzaFranchise(PizzaStore store) {
this.store = store;
}
private PizzaStore store;
public Pizza orderPizza(String type) {
return store.orderPizza(type);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment