Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CoffeeApp implements Runnable {
- @Inject CoffeeMaker coffeeMaker;
- @Override public void run() {
- coffeeMaker.brew();
- }
- public static void main(String[] args) {
- ObjectGraph objectGraph = ObjectGraph.create(new DripCoffeeModule());
- CoffeeApp coffeeApp = objectGraph.get(CoffeeApp.class);
- ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement