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 classFactory 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:RowFormatterGenerates the header row of the data table- Specified by:
headerin classRowFormatter
-
formatRow
Description copied from class:RowFormatterGenerates a single row of the data table for the given object. This method is called for each object of the input.- Specified by:
formatRowin classRowFormatter
-
postProcess
Description copied from class:RowFormatterAllows for post processing the resulting data table. The default implementation just returns the provided list- Overrides:
postProcessin 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
-