001package io.avaje.inject; 002 003import java.lang.annotation.ElementType; 004import java.lang.annotation.Retention; 005import java.lang.annotation.RetentionPolicy; 006import java.lang.annotation.Target; 007 008/** 009 * Identify a bean as being the preferred bean to inject when multiple beans implement 010 * the intended interface. 011 * 012 * <pre>{@code 013 * 014 * @Primary 015 * @Singleton 016 * class PreferredEmailSender implements EmailSender { 017 * 018 * ... 019 * } 020 * }</pre> 021 */ 022@Target({ElementType.TYPE, ElementType.METHOD}) 023@Retention(RetentionPolicy.RUNTIME) 024public @interface Primary { 025}