Annotation Type 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
      java.lang.String name
      Specify a name identifying this format
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Format format
      Specify an inline Format
      java.lang.Class<? extends java.lang.annotation.Annotation> formatAnnotation
      Specify a custom format annotation
    • Element Detail

      • name

        java.lang.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

        java.lang.Class<? extends java.lang.annotation.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