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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull ChartFormatTheChartFormatto use when callingFormattable.formatChart()and related methods, defaulting toChartFormat.DEFAULT.final @NotNull CSVFormatTheCSVFormatto use when callingFormattable.formatCSV()and related methods, defaulting toCSVFormat.DEFAULT.final @NotNull JSONFormatTheJSONFormatto use when callingFormattable.formatJSON()and related methods on records, defaulting toJSONFormat.DEFAULT_FOR_RECORDS.final @NotNull JSONFormatTheJSONFormatto use when callingFormattable.formatJSON()and related methods on results, defaulting toJSONFormat.DEFAULT_FOR_RESULTS.final @NotNull CallbackFormattingProvideronChartFormat(Supplier<? extends ChartFormat> newOnChartFormat) final @NotNull CallbackFormattingProvideronCsvFormat(Supplier<? extends CSVFormat> newOnCsvFormat) final @NotNull CallbackFormattingProvideronJsonFormatForRecords(Supplier<? extends JSONFormat> newOnJsonFormatForRecords) final @NotNull CallbackFormattingProvideronJsonFormatForResults(Supplier<? extends JSONFormat> newOnJsonFormatForResults) final @NotNull CallbackFormattingProvideronTxtFormat(Supplier<? extends TXTFormat> newOnTxtFormat) final @NotNull CallbackFormattingProvideronWidth(ToIntFunction<? super String> newOnWidth) final @NotNull CallbackFormattingProvideronXmlFormatForRecords(Supplier<? extends XMLFormat> newOnXmlFormatForRecords) final @NotNull CallbackFormattingProvideronXmlFormatForResults(Supplier<? extends XMLFormat> newOnXmlFormatForResults) final @NotNull TXTFormatTheTXTFormatto use when callingFormattable.format()and related methods, defaulting toTXTFormat.DEFAULT.final intThe formatting display width in a monospaced font, which may diverge fromString.length()e.g.final @NotNull XMLFormatTheXMLFormatto use when callingFormattable.formatXML()and related methods on records, defaulting toXMLFormat.DEFAULT_FOR_RECORDS.final @NotNull XMLFormatTheXMLFormatto 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:FormattingProviderTheTXTFormatto use when callingFormattable.format()and related methods, defaulting toTXTFormat.DEFAULT.- Specified by:
txtFormatin interfaceFormattingProvider
-
csvFormat
Description copied from interface:FormattingProviderTheCSVFormatto use when callingFormattable.formatCSV()and related methods, defaulting toCSVFormat.DEFAULT.- Specified by:
csvFormatin interfaceFormattingProvider
-
jsonFormatForResults
Description copied from interface:FormattingProviderTheJSONFormatto use when callingFormattable.formatJSON()and related methods on results, defaulting toJSONFormat.DEFAULT_FOR_RESULTS.- Specified by:
jsonFormatForResultsin interfaceFormattingProvider
-
jsonFormatForRecords
Description copied from interface:FormattingProviderTheJSONFormatto use when callingFormattable.formatJSON()and related methods on records, defaulting toJSONFormat.DEFAULT_FOR_RECORDS.- Specified by:
jsonFormatForRecordsin interfaceFormattingProvider
-
xmlFormatForResults
Description copied from interface:FormattingProviderTheXMLFormatto use when callingFormattable.formatXML()and related methods on results, defaulting toXMLFormat.DEFAULT_FOR_RESULTS.- Specified by:
xmlFormatForResultsin interfaceFormattingProvider
-
xmlFormatForRecords
Description copied from interface:FormattingProviderTheXMLFormatto use when callingFormattable.formatXML()and related methods on records, defaulting toXMLFormat.DEFAULT_FOR_RECORDS.- Specified by:
xmlFormatForRecordsin interfaceFormattingProvider
-
chartFormat
Description copied from interface:FormattingProviderTheChartFormatto use when callingFormattable.formatChart()and related methods, defaulting toChartFormat.DEFAULT.- Specified by:
chartFormatin interfaceFormattingProvider
-
width
Description copied from interface:FormattingProviderThe formatting display width in a monospaced font, which may diverge fromString.length()e.g. if the string contains aCharacter.isIdeographic(int)character.- Specified by:
widthin 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)
-