Package com.tngtech.jgiven.annotation
Annotation Type POJOFormat
-
@Documented @AnnotationFormat(POJOAnnotationFormatter.class) @Retention(RUNTIME) @Target({PARAMETER,ANNOTATION_TYPE}) public @interface POJOFormat
A special format annotation to format POJOs- Since:
- 0.15.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description POJOFormat.BracketsEnum
brackets
Specify the opening/closing brackets pair to set POJO string representation apart of its parent (step) string representation.java.lang.String[]
excludeFields
Specifies which fields should be excluded in the report.NamedFormat[]
fieldFormats
Specify an array ofNamedFormat
to use when formatting POJOs fields.java.lang.Class<? extends java.lang.annotation.Annotation>
fieldFormatsAnnotation
Specify a customNamedFormats
annotationjava.lang.String
fieldSeparator
Specify a field separatorjava.lang.String[]
includeFields
Specifies which fields should be included in the report.boolean
includeNullColumns
Whether or not columns with onlynull
values are shown or not.boolean
prefixWithFieldName
When set totrue
, each formatted field value is prefixed by its field name
-
-
-
Element Detail
-
excludeFields
java.lang.String[] excludeFields
Specifies which fields should be excluded in the report.If
includeFields()
is set, then this attribute has no effect- Default:
- {}
-
-
-
brackets
POJOFormat.BracketsEnum brackets
Specify the opening/closing brackets pair to set POJO string representation apart of its parent (step) string representation.Default brackets pair is
POJOFormat.BracketsEnum.SQUARE
.
When no brackets is needed, consider specifyPOJOFormat.BracketsEnum.NONE
- Default:
- com.tngtech.jgiven.annotation.POJOFormat.BracketsEnum.SQUARE
-
-
-
fieldFormatsAnnotation
java.lang.Class<? extends java.lang.annotation.Annotation> fieldFormatsAnnotation
Specify a customNamedFormats
annotationThe
NamedFormat
defined in this set will be used when formatting POJOs fields.
- Default:
- java.lang.annotation.Annotation.class
-
-
-
fieldFormats
NamedFormat[] fieldFormats
Specify an array ofNamedFormat
to use when formatting POJOs fields.When a
NamedFormat.name()
matches a field name, field value is formatted using thisNamedFormat
.Note: when set, has precedence over
fieldFormatsAnnotation()
- Default:
- {}
-
-