Package javax.inject

Annotation Interface Named


@Qualifier @Documented @Retention(RUNTIME) public @interface Named
String-based qualifier.

Example usage:

   public class Car {
     @Inject @Named("driver") Seat driverSeat;
     @Inject @Named("passenger") Seat passengerSeat;
     ...
   }
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name.
  • Element Details

    • value

      String value
      The name.
      Default:
      ""