Annotation Interface NamedFormat


@Retention(RUNTIME) @Target({PARAMETER,ANNOTATION_TYPE}) public @interface NamedFormat
Allow to specify an identifiable format
Since:
0.15.0
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specify a name identifying this format
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specify an inline Format
    Class<? extends Annotation>
    Specify a custom format annotation
  • Element Details

    • name

      String name
      Specify a name identifying this format
    • format

      Format format
      Specify an inline Format

      Mutually exclusive with formatAnnotation()

      Default:
      @com.tngtech.jgiven.annotation.Format(com.tngtech.jgiven.format.DefaultObjectFormatter.class)
    • formatAnnotation

      Class<? extends Annotation> formatAnnotation
      Specify a custom format annotation

      • mutually exclusive with format()
      • when set, has precedence over any specified format()

      Default:
      java.lang.annotation.Annotation.class