You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jim Riordan edited this page Aug 10, 2016
·
1 revision
###Duplicate types
You have to remember that you can't add the same type twice to the container.
container.add(Engine.class);
container.add(Engine.class); // will throw ContainerException
In the example above, the container will tell you that Engine has already been added. Yadic will always keep you from adding duplicates when a call to the second add method is made.
Yadic will also not allow you to register multiple implementations of one interface: