dependency-lookup

How to choose between methods of acquiring dependencies?

I've seen at least three ways of acquiring dependencies in a Java object without coupling the object to the creation of the dependency; Dependency Injection - some framework injects a required object into another object based on an external configuration, example: Spring managed beans Dependency Lookup - a class looks up a required dep...