org.springframework.format.support
Class FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory

java.lang.Object
  extended by org.springframework.format.support.FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory
All Implemented Interfaces:
AnnotationFormatterFactory<DateTimeFormat>
Enclosing class:
FormattingConversionServiceFactoryBean

private static final class FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory
extends java.lang.Object
implements AnnotationFormatterFactory<DateTimeFormat>

Dummy AnnotationFormatterFactory that simply fails if @DateTimeFormat is being used without the JodaTime library being present.


Field Summary
private  java.util.Set<java.lang.Class<?>> fieldTypes
           
 
Constructor Summary
FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory()
           
 
Method Summary
 java.util.Set<java.lang.Class<?>> getFieldTypes()
          The types of fields that may be annotated with the <A> annotation.
 Parser<?> getParser(DateTimeFormat annotation, java.lang.Class<?> fieldType)
          Get the Parser to parse a submitted value for a field of fieldType annotated with annotation.
 Printer<?> getPrinter(DateTimeFormat annotation, java.lang.Class<?> fieldType)
          Get the Printer to print the value of a field of fieldType annotated with annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldTypes

private final java.util.Set<java.lang.Class<?>> fieldTypes
Constructor Detail

FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory

public FormattingConversionServiceFactoryBean.NoJodaDateTimeFormatAnnotationFormatterFactory()
Method Detail

getFieldTypes

public java.util.Set<java.lang.Class<?>> getFieldTypes()
Description copied from interface: AnnotationFormatterFactory
The types of fields that may be annotated with the <A> annotation.

Specified by:
getFieldTypes in interface AnnotationFormatterFactory<DateTimeFormat>

getPrinter

public Printer<?> getPrinter(DateTimeFormat annotation,
                             java.lang.Class<?> fieldType)
Description copied from interface: 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 coersion from fieldType to <T> will be attempted before the Printer is invoked.

Specified by:
getPrinter in interface AnnotationFormatterFactory<DateTimeFormat>
Parameters:
annotation - the annotation instance
fieldType - the type of field that was annotated
Returns:
the printer

getParser

public Parser<?> getParser(DateTimeFormat annotation,
                           java.lang.Class<?> fieldType)
Description copied from interface: 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 coersion to fieldType will be attempted before the field is set.

Specified by:
getParser in interface AnnotationFormatterFactory<DateTimeFormat>
Parameters:
annotation - the annotation instance
fieldType - the type of field that was annotated
Returns:
the parser