Annotation Interface Named


@Retention(RUNTIME) public @interface Named
An annotation that specifies a name to specify a method in a test class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A default value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Should return a name to specify a method this annotation is attached to.
  • Field Details

    • DEFAULT_VALUE

      static final String DEFAULT_VALUE

      A default value.

      The name of the annotated method is recognized using the method name itself. The signature will not be taken into account. To avoid ambiguity, specify the name explicitly.

      See Also:
  • Element Details

    • value

      String value
      Should return a name to specify a method this annotation is attached to. If the value is a string without length, the name of the method (Method#getName()) itself will be used for it.
      Returns:
      A name of a method this annotation is attached to.
      Default:
      ""