インターフェース AnnotationFormatterFactory<A extends AnnotationSE>

型パラメーター:
A - フォーマットをトリガーするアノテーション型
すべての既知の実装クラス:
DateTimeFormatAnnotationFormatterFactoryJsr310DateTimeFormatAnnotationFormatterFactoryJsr354NumberFormatAnnotationFormatterFactoryNumberFormatAnnotationFormatterFactory

public interface AnnotationFormatterFactory<A extends AnnotationSE>
特定の AnnotationSE のアノテーションが付けられたフィールドの値をフォーマットするフォーマッターを作成するファクトリ。

例: DateTimeFormatAnnotationFormatterFactory は、@DateTimeFormat アノテーションが付けられたフィールドに設定された Date 値をフォーマットするフォーマッターを作成する場合があります。

導入:
3.0
作成者:
Keith Donald
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    アノテーションでアノテーションを付けることができるフィールドの型 <A>。</a>
    getParser(A annotation, ClassSE<?> fieldType)
    annotation のアノテーションが付けられた fieldType のフィールドに対して送信された値を解析するパーサーを取得します。
    getPrinter(A annotation, ClassSE<?> fieldType)
    annotation のアノテーションが付けられた fieldType のフィールドの値を出力するプリンターを取得します。
  • メソッドの詳細

    • getFieldTypes

      SetSE<ClassSE<?>> getFieldTypes()
      アノテーションでアノテーションを付けることができるフィールドの型 <A>。</a>
    • getPrinter

      Printer<?> getPrinter(A annotation, ClassSE<?> fieldType)
      annotation のアノテーションが付けられた fieldType のフィールドの値を出力するプリンターを取得します。

      プリンターが受け入れる型 T が fieldType に割り当て可能でない場合、プリンターが呼び出される前に fieldType から T への強制が試行されます。

      パラメーター:
      annotation - アノテーションインスタンス
      fieldType - アノテーションが付けられたフィールドの型
      戻り値:
      プリンター
    • getParser

      Parser<?> getParser(A annotation, ClassSE<?> fieldType)
      annotation のアノテーションが付けられた fieldType のフィールドに対して送信された値を解析するパーサーを取得します。

      パーサーが返すオブジェクトが fieldType に割り当てられない場合、フィールドが設定される前に fieldType への強制が試行されます。

      パラメーター:
      annotation - アノテーションインスタンス
      fieldType - アノテーションが付けられたフィールドの型
      戻り値:
      パーサー