クラス DateTimeFormatAnnotationFormatterFactory

java.lang.ObjectSE
org.springframework.context.support.EmbeddedValueResolutionSupport
org.springframework.format.datetime.DateTimeFormatAnnotationFormatterFactory
実装されたすべてのインターフェース:
AwareEmbeddedValueResolverAwareAnnotationFormatterFactory<DateTimeFormat>

public class DateTimeFormatAnnotationFormatterFactory extends EmbeddedValueResolutionSupport implements AnnotationFormatterFactory<DateTimeFormat>
DateFormatter を使用して、DateTimeFormat アノテーションが付けられたフィールドをフォーマットします。
導入:
3.2
作成者:
Phillip Webb, Sam Brannen
  • コンストラクターの詳細

    • DateTimeFormatAnnotationFormatterFactory

      public DateTimeFormatAnnotationFormatterFactory()
  • メソッドの詳細

    • getFieldTypes

      public SetSE<ClassSE<?>> getFieldTypes()
      インターフェースからコピーされた説明: AnnotationFormatterFactory
      アノテーションでアノテーションを付けることができるフィールドの型 <A>。</a>
      次で指定:
      インターフェース AnnotationFormatterFactory<DateTimeFormat>getFieldTypes 
    • getPrinter

      public Printer<?> getPrinter(DateTimeFormat annotation, ClassSE<?> fieldType)
      インターフェースからコピーされた説明: AnnotationFormatterFactory
      annotation のアノテーションが付けられた fieldType のフィールドの値を出力するプリンターを取得します。

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

      次で指定:
      インターフェース AnnotationFormatterFactory<DateTimeFormat>getPrinter 
      パラメーター:
      annotation - アノテーションインスタンス
      fieldType - アノテーションが付けられたフィールドの型
      戻り値:
      プリンター
    • getParser

      public Parser<?> getParser(DateTimeFormat annotation, ClassSE<?> fieldType)
      インターフェースからコピーされた説明: AnnotationFormatterFactory
      annotation のアノテーションが付けられた fieldType のフィールドに対して送信された値を解析するパーサーを取得します。

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

      次で指定:
      インターフェース AnnotationFormatterFactory<DateTimeFormat>getParser 
      パラメーター:
      annotation - アノテーションインスタンス
      fieldType - アノテーションが付けられたフィールドの型
      戻り値:
      パーサー
    • getFormatter

      protected Formatter<DateSE> getFormatter(DateTimeFormat annotation, ClassSE<?> fieldType)