diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java index 66584ea56c5..eb413a6ea7a 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/DateFormatterRegistrar.java @@ -23,19 +23,18 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converter.ConverterRegistry; import org.springframework.format.FormatterRegistrar; import org.springframework.format.FormatterRegistry; -import org.springframework.format.datetime.joda.JodaTimeFormatterRegistrar; import org.springframework.util.Assert; /** * Configures Date formatting for use with Spring. *

* Designed for direct instantiation but also exposes the static - * {@link #addDateConverters(ConverterRegistry)} utility method for ad hoc use against any - * {@code ConverterRegistry} instance. + * {@link #addDateConverters(ConverterRegistry)} utility method for ad hoc use + * against any {@code ConverterRegistry} instance. * * @author Phillip Webb * @since 3.2 - * @see JodaTimeFormatterRegistrar + * @see org.springframework.format.datetime.joda.JodaTimeFormatterRegistrar * @see FormatterRegistrar#registerFormatters */ public class DateFormatterRegistrar implements FormatterRegistrar { @@ -52,7 +51,7 @@ public class DateFormatterRegistrar implements FormatterRegistrar { } /** - * Set the date formatter to register. If not specified default {@link DateFormatter} + * Set the date formatter to register. If not specified the default {@link DateFormatter} * will be used. This method can be used if additional formatter configuration is * required. * @param dateFormatter the date formatter diff --git a/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java index 6e6da41a4c4..93efaf43a8f 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/DateTimeFormatAnnotationFormatterFactory.java @@ -28,15 +28,15 @@ import org.springframework.format.Formatter; import org.springframework.format.Parser; import org.springframework.format.Printer; import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.format.datetime.joda.JodaDateTimeFormatAnnotationFormatterFactory; import org.springframework.util.StringValueResolver; /** - * Formats fields annotated with the {@link DateTimeFormat} annotation. + * Formats fields annotated with the {@link DateTimeFormat} annotation using + * a {@link DateFormatter}. * * @author Phillip Webb - * @see JodaDateTimeFormatAnnotationFormatterFactory * @since 3.2 + * @see org.springframework.format.datetime.joda.JodaDateTimeFormatAnnotationFormatterFactory */ public class DateTimeFormatAnnotationFormatterFactory implements AnnotationFormatterFactory, EmbeddedValueResolverAware { diff --git a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactory.java index 89cd13a8bd3..7408e3c506a 100644 --- a/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/datetime/joda/DateTimeFormatterFactory.java @@ -22,13 +22,14 @@ import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.ISODateTimeFormat; + import org.springframework.beans.factory.FactoryBean; import org.springframework.format.annotation.DateTimeFormat.ISO; import org.springframework.util.StringUtils; /** * {@link FactoryBean} that creates a Joda {@link DateTimeFormatter}. Formatters will be - * created using the defined {@link #setPattern(String) pattern}, {@link #setIso(ISO) ISO} + * created using the defined {@link #setPattern(String) pattern}, {@link #setIso(ISO) ISO}, * or {@link #setStyle(String) style} (considered in that order). * * @author Phillip Webb @@ -48,13 +49,13 @@ public class DateTimeFormatterFactory implements FactoryBean /** - * Create a new {@link DateTimeFormatterFactory} instance. + * Create a new {@code DateTimeFormatterFactory} instance. */ public DateTimeFormatterFactory() { } /** - * Create a new {@link DateTimeFormatterFactory} instance. + * Create a new {@code DateTimeFormatterFactory} instance. * @param pattern the pattern to use to format date values */ public DateTimeFormatterFactory(String pattern) { @@ -75,8 +76,8 @@ public class DateTimeFormatterFactory implements FactoryBean } /** - * Get a new DateTimeFormatter using this factory. If no specific - * {@link #setStyle(String) style} {@link #setIso(ISO) ISO} or + * Get a new {@code DateTimeFormatter} using this factory. If no specific + * {@link #setStyle(String) style}, {@link #setIso(ISO) ISO}, or * {@link #setPattern(String) pattern} have been defined the * {@link DateTimeFormat#mediumDateTime() medium date time format} will be used. * @return a new date time formatter @@ -88,9 +89,9 @@ public class DateTimeFormatterFactory implements FactoryBean } /** - * Get a new DateTimeFormatter using this factory. If no specific - * {@link #setStyle(String) style} {@link #setIso(ISO) ISO} or - * {@link #setPattern(String) pattern} have been defined the specific + * Get a new {@code DateTimeFormatter} using this factory. If no specific + * {@link #setStyle(String) style}, {@link #setIso(ISO) ISO}, or + * {@link #setPattern(String) pattern} have been defined the supplied * {@code fallbackFormatter} will be used. * @param fallbackFormatter the fall-back formatter to use when no specific factory * properties have been set (can be {@code null}). @@ -125,7 +126,7 @@ public class DateTimeFormatterFactory implements FactoryBean /** - * Set the TimeZone to normalize the date values into, if any. + * Set the {@code TimeZone} to normalize the date values into, if any. * @param timeZone the time zone */ public void setTimeZone(TimeZone timeZone) { @@ -133,16 +134,16 @@ public class DateTimeFormatterFactory implements FactoryBean } /** - * Set the two character to use to format date values. The first character used for - * the date style, the second is for the time style. Supported characters are + * Set the two characters to use to format date values. The first character is used for + * the date style; the second is for the time style. Supported characters are: *