// AutomatedTellerMachineImpl.transport 使用@Inject来注入变量域transport
...
public class AutomatedTellerMachineImpl implements AutomatedTellerMachine {
@Inject
private ATMTransport transport;
Example 2. AutomatedTellerMachineImpl.transport 使用@Inject来注入构造器参数
...
public class AutomatedTellerMachineImpl implements AutomatedTellerMachine {
@Inject
public AutomatedTellerMachineImpl(ATMTransport transport) {
this.transport = transport;
}