Annotation Interface Tag


Русский: Указывает что проаннотированный компонент Component имеет определенный тег и будет внедрен как зависимость именно там где требуется такой же тег.
English: Indicates that the annotated component Component has a specific tag and will be implemented as a dependency exactly where the same tag is required.

Пример / Example:
  
  @KoraApp
  public interface Application {

     @Tag(String.class)
     default Supplier<String> tagStrSupplier() {
         return () -> "1";
     }

     default Supplier<String> myStr(@Tag(String.class) Supplier<String> tagStr) {
         return s -> tagStr.get() + "2";
     }
  }
  
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Русский: Специальный тип тега который означает что тэг подходит под любое условие внедрения зависимости, то есть соответствует любому тэгу.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<?>[]
     
  • Element Details

    • value

      Class<?>[] value