インターフェースの使用
org.springframework.format.Printer
Printer を使用するパッケージ
パッケージ
説明
UI での表示用にフィールドモデル値をフォーマットするフォーマッターを定義するための API。
java.util.Date プロパティのフォーマッタ。JDK 8 の JSR-310
java.time パッケージとの統合。java.lang.Number プロパティのフォーマッタ。JSR-354
javax.money パッケージとの統合。 フォーマットパッケージのクラスをサポートし、一般的な実装とアダプターを提供します。
org.springframework.format 内の Printer 使用
org.springframework.format 内の Printer サブインターフェースPrinter を返す org.springframework.format のメソッド修飾子と型メソッド説明Printer<?>AnnotationFormatterFactory.getPrinter(A annotation, ClassSE<?> fieldType) annotationのアノテーションが付けられたfieldTypeのフィールドの値を出力するプリンターを取得します。型 Printer のパラメーターを持つ org.springframework.format のメソッド修飾子と型メソッド説明voidFormatterRegistry.addFormatterForFieldType(ClassSE<?> fieldType, Printer<?> printer, Parser<?> parser) プリンター / パーサーのペアを追加して、特定の型のフィールドをフォーマットします。voidFormatterRegistry.addPrinter(Printer<?> printer) 特定の型のフィールドを出力するプリンターを追加します。org.springframework.format.datetime 内の Printer 使用
Printer を実装している org.springframework.format.datetime のクラスPrinter を返す org.springframework.format.datetime のメソッド修飾子と型メソッド説明Printer<?>DateTimeFormatAnnotationFormatterFactory.getPrinter(DateTimeFormat annotation, ClassSE<?> fieldType) org.springframework.format.datetime.standard 内の Printer 使用
Printer を実装している org.springframework.format.datetime.standard のクラス修飾子と型クラス説明classJSR-310DurationSE のFormatter実装。デフォルトで Duration の JSR-310 解析ルールに従い、追加のDurationFormat.Styleスタイルをサポートします。classJSR-310InstantSE のFormatter実装、インスタントに対する JSR-310 の解析ルールに従う(つまり、構成可能なDateTimeFormatterSE を使用しない): デフォルトのISO_INSTANT形式とRFC_1123_DATE_TIME(HTTP 日付ヘッダー値に一般的に使用されます)を受け入れます。Spring 4.3 以降。final class修飾子と型メソッド説明Printer<?>DurationFormatAnnotationFormatterFactory.getPrinter(DurationFormat annotation, ClassSE<?> fieldType) Printer<?>Jsr310DateTimeFormatAnnotationFormatterFactory.getPrinter(DateTimeFormat annotation, ClassSE<?> fieldType) org.springframework.format.number 内の Printer 使用
Printer を実装している org.springframework.format.number のクラス修飾子と型クラス説明classNumbers の抽象フォーマッタ。AbstractNumberFormatter.getNumberFormat(java.util.Locale)テンプレートメソッドを提供します。class通貨スタイルの数値の BigDecimal フォーマッター。classNumberFormat の数値スタイルを使用する汎用数値フォーマッター。classパーセントスタイルの数値のフォーマッター。Printer を返す org.springframework.format.number のメソッド修飾子と型メソッド説明NumberFormatAnnotationFormatterFactory.getPrinter(NumberFormat annotation, ClassSE<?> fieldType) org.springframework.format.number.money 内の Printer 使用
Printer を実装している org.springframework.format.number.money のクラス修飾子と型クラス説明classJSR-354CurrencyUnit値のフォーマッター(通貨コード文字列との間)。classJSR-354MonetaryAmount値のフォーマッター。MonetaryAmountFormat.format(javax.money.MonetaryAmount)およびMonetaryAmountFormat.parse(java.lang.CharSequence)に委譲します。修飾子と型メソッド説明Printer<javax.money.MonetaryAmount>Jsr354NumberFormatAnnotationFormatterFactory.getPrinter(NumberFormat annotation, ClassSE<?> fieldType) org.springframework.format.support 内の Printer 使用
型 Printer のパラメーターを持つ org.springframework.format.support のメソッド修飾子と型メソッド説明voidFormattingConversionService.addFormatterForFieldType(ClassSE<?> fieldType, Printer<?> printer, Parser<?> parser) voidFormattingConversionService.addPrinter(Printer<?> printer)