Details

    Description

      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;
      ...
      }

      Attachments

        Activity

          People

            scabanovich Viacheslav Kabanovich (Inactive)
            alexeykazakov Alexey Kazakov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: