java.lang.Object
org.jooq.impl.CallbackFormattingProvider
- All Implemented Interfaces:
FormattingProvider
A
FormattingProvider
that allows for functional composition.
For example:
FormattingProvider listener = FormattingProvider
.on(ctx -> something())
.onVisitEnd(ctx -> something());
- Author:
- Lukas Eder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull ChartFormat
TheChartFormat
to use when callingFormattable.formatChart()
and related methods, defaulting toChartFormat.DEFAULT
.final @NotNull CSVFormat
TheCSVFormat
to use when callingFormattable.formatCSV()
and related methods, defaulting toCSVFormat.DEFAULT
.final @NotNull JSONFormat
TheJSONFormat
to use when callingFormattable.formatJSON()
and related methods on records, defaulting toJSONFormat.DEFAULT_FOR_RECORDS
.final @NotNull JSONFormat
TheJSONFormat
to use when callingFormattable.formatJSON()
and related methods on results, defaulting toJSONFormat.DEFAULT_FOR_RESULTS
.final @NotNull CallbackFormattingProvider
onChartFormat
(Supplier<? extends ChartFormat> newOnChartFormat) final @NotNull CallbackFormattingProvider
onCsvFormat
(Supplier<? extends CSVFormat> newOnCsvFormat) final @NotNull CallbackFormattingProvider
onJsonFormatForRecords
(Supplier<? extends JSONFormat> newOnJsonFormatForRecords) final @NotNull CallbackFormattingProvider
onJsonFormatForResults
(Supplier<? extends JSONFormat> newOnJsonFormatForResults) final @NotNull CallbackFormattingProvider
onTxtFormat
(Supplier<? extends TXTFormat> newOnTxtFormat) final @NotNull CallbackFormattingProvider
onWidth
(ToIntFunction<? super String> newOnWidth) final @NotNull CallbackFormattingProvider
onXmlFormatForRecords
(Supplier<? extends XMLFormat> newOnXmlFormatForRecords) final @NotNull CallbackFormattingProvider
onXmlFormatForResults
(Supplier<? extends XMLFormat> newOnXmlFormatForResults) final @NotNull TXTFormat
TheTXTFormat
to use when callingFormattable.format()
and related methods, defaulting toTXTFormat.DEFAULT
.final int
The formatting display width in a monospaced font, which may diverge fromString.length()
e.g.final @NotNull XMLFormat
TheXMLFormat
to use when callingFormattable.formatXML()
and related methods on records, defaulting toXMLFormat.DEFAULT_FOR_RECORDS
.final @NotNull XMLFormat
TheXMLFormat
to use when callingFormattable.formatXML()
and related methods on results, defaulting toXMLFormat.DEFAULT_FOR_RESULTS
.
-
Constructor Details
-
CallbackFormattingProvider
public CallbackFormattingProvider()
-
-
Method Details
-
txtFormat
Description copied from interface:FormattingProvider
TheTXTFormat
to use when callingFormattable.format()
and related methods, defaulting toTXTFormat.DEFAULT
.- Specified by:
txtFormat
in interfaceFormattingProvider
-
csvFormat
Description copied from interface:FormattingProvider
TheCSVFormat
to use when callingFormattable.formatCSV()
and related methods, defaulting toCSVFormat.DEFAULT
.- Specified by:
csvFormat
in interfaceFormattingProvider
-
jsonFormatForResults
Description copied from interface:FormattingProvider
TheJSONFormat
to use when callingFormattable.formatJSON()
and related methods on results, defaulting toJSONFormat.DEFAULT_FOR_RESULTS
.- Specified by:
jsonFormatForResults
in interfaceFormattingProvider
-
jsonFormatForRecords
Description copied from interface:FormattingProvider
TheJSONFormat
to use when callingFormattable.formatJSON()
and related methods on records, defaulting toJSONFormat.DEFAULT_FOR_RECORDS
.- Specified by:
jsonFormatForRecords
in interfaceFormattingProvider
-
xmlFormatForResults
Description copied from interface:FormattingProvider
TheXMLFormat
to use when callingFormattable.formatXML()
and related methods on results, defaulting toXMLFormat.DEFAULT_FOR_RESULTS
.- Specified by:
xmlFormatForResults
in interfaceFormattingProvider
-
xmlFormatForRecords
Description copied from interface:FormattingProvider
TheXMLFormat
to use when callingFormattable.formatXML()
and related methods on records, defaulting toXMLFormat.DEFAULT_FOR_RECORDS
.- Specified by:
xmlFormatForRecords
in interfaceFormattingProvider
-
chartFormat
Description copied from interface:FormattingProvider
TheChartFormat
to use when callingFormattable.formatChart()
and related methods, defaulting toChartFormat.DEFAULT
.- Specified by:
chartFormat
in interfaceFormattingProvider
-
width
Description copied from interface:FormattingProvider
The formatting display width in a monospaced font, which may diverge fromString.length()
e.g. if the string contains aCharacter.isIdeographic(int)
character.- Specified by:
width
in interfaceFormattingProvider
-
onTxtFormat
@NotNull public final @NotNull CallbackFormattingProvider onTxtFormat(Supplier<? extends TXTFormat> newOnTxtFormat) -
onCsvFormat
@NotNull public final @NotNull CallbackFormattingProvider onCsvFormat(Supplier<? extends CSVFormat> newOnCsvFormat) -
onJsonFormatForResults
@NotNull public final @NotNull CallbackFormattingProvider onJsonFormatForResults(Supplier<? extends JSONFormat> newOnJsonFormatForResults) -
onJsonFormatForRecords
@NotNull public final @NotNull CallbackFormattingProvider onJsonFormatForRecords(Supplier<? extends JSONFormat> newOnJsonFormatForRecords) -
onXmlFormatForResults
@NotNull public final @NotNull CallbackFormattingProvider onXmlFormatForResults(Supplier<? extends XMLFormat> newOnXmlFormatForResults) -
onXmlFormatForRecords
@NotNull public final @NotNull CallbackFormattingProvider onXmlFormatForRecords(Supplier<? extends XMLFormat> newOnXmlFormatForRecords) -
onChartFormat
@NotNull public final @NotNull CallbackFormattingProvider onChartFormat(Supplier<? extends ChartFormat> newOnChartFormat) -
onWidth
@NotNull public final @NotNull CallbackFormattingProvider onWidth(ToIntFunction<? super String> newOnWidth)
-