All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dinject.Primary Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
package io.dinject;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Identify a bean as being the preferred bean to inject when multiple beans implement
 * the intended interface.
 *
 * 
{@code
 *
 * @Primary
 * @Singleton
 * class PreferredEmailSender implements EmailSender {
 *
 *   ...
 * }
 * }
*/ @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface Primary { }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy