001package io.avaje.inject; 002 003import java.lang.annotation.Documented; 004import java.lang.annotation.Retention; 005import java.lang.annotation.Target; 006import java.util.List; 007 008import static java.lang.annotation.ElementType.TYPE; 009import static java.lang.annotation.RetentionPolicy.RUNTIME; 010 011/** 012 * The <code>Priority</code> annotation can be applied to classes to indicate 013 * in what order they should be returned via @{@link SystemContext#getBeansByPriority(Class)}. 014 * <p> 015 * Beans can be returned using other Priority annotation such as <code>javax.annotation.Priority</code> 016 * or any custom priority annotation that has an <code>int value()</code> attribute. 017 * </p> 018 * 019 * @see BeanContext#getBeansByPriority(Class) 020 * @see BeanContext#getBeansByPriority(Class, Class) 021 * @see BeanContext#sortByPriority(List, Class) 022 */ 023@Documented 024@Retention(RUNTIME) 025@Target(TYPE) 026public @interface Priority { 027 int value(); 028}