b>;
     }
     void start() { ... }
     long stop() { ... }
   }</pre>

 <p>If more flexibility is needed, the object can call out to a factory or
 service locator:

 <pre>   class Stopwatch {
     final TimeSource timeSource;
     Stopwatch () {
       timeSource = <b>DefaultTimeSource.getInstance()</b>;
     }
     void start() { ... }
     long stop() { ... }
   }</pre>

 <p>In deciding between these traditional approaches to dependency
 resolution, a programmer must make trade-offs. Constructors are m