Package com.tngtech.jgiven.format
Interface ArgumentFormatter<T>
- Type Parameters:
T- the type of the object to format
- All Known Implementing Classes:
BooleanFormatter,DateFormatter,DefaultFormatter,DefaultObjectFormatter,NotFormatter,PrintfFormatter,StepFormatter.AnnotationBasedFormatter
public interface ArgumentFormatter<T>
Interface for defining custom argument formatter using the
Format annotation.
Note that in many cases it is more convenient to define a custom formatter annotation using the AnnotationFormat
annotation and defining an AnnotationArgumentFormatter.
Alternatively you can also provide a global formatter for a type (see Formatter).
- See Also:
-
Method Summary
-
Method Details
-
format
Format a single argument by taking optional formatter arguments into account.- Parameters:
argumentToFormat- the object to formatformatterArguments- optional arguments for the formatter to control the formatting.- Returns:
- a formatted string
-