Annotation Interface NamedInterface


@Documented @Target({PACKAGE,TYPE}) @Retention(RUNTIME) public @interface NamedInterface
Annotation to mark a package as named interface of a ApplicationModule or assign a type to a named interface.
Author:
Oliver Drotbohm, Iván García Sainz-Aja
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name(s) of the named interface.
    boolean
    Whether to automatically propagate the named interface assignment to related types of the annotated one.
    The name(s) of the named interface.
  • Element Details

    • value

      @AliasFor("name") String[] value
      The name(s) of the named interface. If declared on a package, the package's local name will be used as default name. Declaring multiple values here is useful in case named interfaces are defined based on types and a particular type is supposed to be part of multiple named interfaces.
      Returns:
      will never be null.
      Default:
      {}
    • name

      @AliasFor("value") String[] name
      The name(s) of the named interface. If declared on a package, the package's local name will be used as default name. Declaring multiple values here is useful in case named interfaces are defined based on types and a particular type is supposed to be part of multiple named interfaces.
      Returns:
      will never be null.
      Default:
      {}
    • propagate

      boolean propagate
      Whether to automatically propagate the named interface assignment to related types of the annotated one. When set to true, types that appear in public method signatures (parameters and return types) of the explicitly annotated types and are located in the same package space, will also be considered part of the named interface declared.
      Returns:
      true to automatically include related types, false otherwise
      Since:
      2.0
      Default:
      true