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

    Modifier and Type
    Method
    Description
    format(T argumentToFormat, String... formatterArguments)
    Format a single argument by taking optional formatter arguments into account.
  • Method Details

    • format

      String format(T argumentToFormat, String... formatterArguments)
      Format a single argument by taking optional formatter arguments into account.
      Parameters:
      argumentToFormat - the object to format
      formatterArguments - optional arguments for the formatter to control the formatting.
      Returns:
      a formatted string