-
Sub-task
-
Resolution: Done
-
Major
-
None
2.2. @Exact
Annotating an injection point with @Exact allows you to select an exact implementation of the injection point type to inject. For example:
interface PaymentService {
...
}
class ChequePaymentService implements PaymentService {
...
}
class CardPaymentService implements PaymentService {
...
}
class PaymentProcessor {
@Inject @Exact(CardPaymentService.class)
PaymentService paymentService;
...
}