Skip to content

Instantly share code, notes, and snippets.

@amoerie
Created June 20, 2013 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amoerie/5825999 to your computer and use it in GitHub Desktop.
Save amoerie/5825999 to your computer and use it in GitHub Desktop.
SmartBox smartBox = new SmartBox();
smartBox.bind(Warrior.class, Samurai.class);
smartBox.bind(Weapon.class, Nunchucks.class);
Warrior warrior = smartBox.get(Warrior.class);
warrior.fight();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment