Package com.tngtech.jgiven.annotation
Annotation Interface 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of opening/closing brackets pair :POJOFormat.BracketsEnum.NONE: no bracketsPOJOFormat.BracketsEnum.PARENTHESES:(...)POJOFormat.BracketsEnum.SQUARE:[...]POJOFormat.BracketsEnum.BRACES:{...}POJOFormat.BracketsEnum.POINTY:<...>POJOFormat.BracketsEnum.CHEVRONS:<<...>>POJOFormat.BracketsEnum.DOUBLE_QUOTE:"..."POJOFormat.BracketsEnum.SINGLE_QUOTE:'...' -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecify the opening/closing brackets pair to set POJO string representation apart of its parent (step) string representation.String[]Specifies which fields should be excluded in the report.Specify an array ofNamedFormatto use when formatting POJOs fields.Class<? extends Annotation>Specify a customNamedFormatsannotationSpecify a field separatorString[]Specifies which fields should be included in the report.booleanWhether or not columns with onlynullvalues are shown or not.booleanWhen set totrue, each formatted field value is prefixed by its field name
-
Element Details
-
excludeFields
String[] excludeFieldsSpecifies which fields should be excluded in the report.If
includeFields()is set, then this attribute has no effect- Default:
- {}
-
includeFields
String[] includeFieldsSpecifies which fields should be included in the report. All fields not in this list will be excluded.- Default:
- {}
-
includeNullColumns
boolean includeNullColumnsWhether or not columns with onlynullvalues are shown or not. Default is to not show them.- Default:
- false
-
prefixWithFieldName
boolean prefixWithFieldNameWhen set totrue, each formatted field value is prefixed by its field name- Default:
- false
-
fieldSeparator
String fieldSeparatorSpecify a field separator- Default:
- ","
-
brackets
POJOFormat.BracketsEnum bracketsSpecify 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:
- SQUARE
-
fieldFormatsAnnotation
Class<? extends Annotation> fieldFormatsAnnotationSpecify a customNamedFormatsannotationThe
NamedFormatdefined in this set will be used when formatting POJOs fields.
- Default:
- java.lang.annotation.Annotation.class
-
fieldFormats
NamedFormat[] fieldFormatsSpecify an array ofNamedFormatto 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:
- {}
-