类 Jsr354NumberFormatAnnotationFormatterFactory

java.lang.Object
cn.taketoday.context.support.EmbeddedValueResolutionSupport
cn.taketoday.format.number.money.Jsr354NumberFormatAnnotationFormatterFactory
所有已实现的接口:
Aware, EmbeddedValueResolverAware, AnnotationFormatterFactory<NumberFormat>

public class Jsr354NumberFormatAnnotationFormatterFactory extends EmbeddedValueResolutionSupport implements AnnotationFormatterFactory<NumberFormat>
Formats MonetaryAmount fields annotated with Framework's common NumberFormat annotation.
从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 构造器详细资料

    • Jsr354NumberFormatAnnotationFormatterFactory

      public Jsr354NumberFormatAnnotationFormatterFactory()
  • 方法详细资料

    • getFieldTypes

      public Set<Class<?>> getFieldTypes()
      从接口复制的说明: AnnotationFormatterFactory
      The types of fields that may be annotated with the <A> annotation.
      指定者:
      getFieldTypes 在接口中 AnnotationFormatterFactory<NumberFormat>
    • getPrinter

      public Printer<javax.money.MonetaryAmount> getPrinter(NumberFormat annotation, Class<?> fieldType)
      从接口复制的说明: AnnotationFormatterFactory
      Get the Printer to print the value of a field of fieldType annotated with annotation.

      If the type T the printer accepts is not assignable to fieldType, a coercion from fieldType to T will be attempted before the Printer is invoked.

      指定者:
      getPrinter 在接口中 AnnotationFormatterFactory<NumberFormat>
      参数:
      annotation - the annotation instance
      fieldType - the type of field that was annotated
      返回:
      the printer
    • getParser

      public Parser<javax.money.MonetaryAmount> getParser(NumberFormat annotation, Class<?> fieldType)
      从接口复制的说明: AnnotationFormatterFactory
      Get the Parser to parse a submitted value for a field of fieldType annotated with annotation.

      If the object the parser returns is not assignable to fieldType, a coercion to fieldType will be attempted before the field is set.

      指定者:
      getParser 在接口中 AnnotationFormatterFactory<NumberFormat>
      参数:
      annotation - the annotation instance
      fieldType - the type of field that was annotated
      返回:
      the parser