Package com.tngtech.jgiven.format.table
Class FieldBasedRowFormatter
java.lang.Object
com.tngtech.jgiven.format.table.RowFormatter
com.tngtech.jgiven.format.table.FieldBasedRowFormatter
Default implementation of the
RowFormatter
that uses the fields of an
object as columns of the table-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Factory for creating instances ofFieldBasedRowFormatter
-
Constructor Summary
ConstructorsConstructorDescriptionFieldBasedRowFormatter
(Class<?> type, String parameterName, Table tableAnnotation, Annotation[] annotations) -
Method Summary
Modifier and TypeMethodDescriptionGenerates a single row of the data table for the given object.header()
Generates the header row of the data tablepostProcess
(List<List<String>> list) Allows for post processing the resulting data table.
-
Constructor Details
-
FieldBasedRowFormatter
public FieldBasedRowFormatter(Class<?> type, String parameterName, Table tableAnnotation, Annotation[] annotations)
-
-
Method Details
-
header
Description copied from class:RowFormatter
Generates the header row of the data table- Specified by:
header
in classRowFormatter
-
formatRow
Description copied from class:RowFormatter
Generates a single row of the data table for the given object. This method is called for each object of the input.- Specified by:
formatRow
in classRowFormatter
-
postProcess
Description copied from class:RowFormatter
Allows for post processing the resulting data table. The default implementation just returns the provided list- Overrides:
postProcess
in classRowFormatter
- Parameters:
list
- the table that has been generated by calls to theRowFormatter.header()
and theRowFormatter.formatRow(Object)
methods- Returns:
- a potentially new table or just the passed table
-