javadoc polish
This commit is contained in:
parent
d65454175d
commit
b6ec4e30d9
|
|
@ -29,7 +29,7 @@ public interface FormatterRegistry {
|
|||
|
||||
/**
|
||||
* Adds a Formatter to format fields of a specific type.
|
||||
* The Formatter will delegate to the specified <code>printer</code> for printing and <code>parser</code> for parsing.
|
||||
* The Formatter will delegate to the specified <code>printer</code> for printing and the specified <code>parser</code> for parsing.
|
||||
* <p>
|
||||
* On print, if the Printer's type T is declared and <code>fieldType</code> is not assignable to T,
|
||||
* a coersion to T will be attempted before delegating to <code>printer</code> to print a field value.
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Indicates a property should be formatted as a date time.
|
||||
* Declares that a field should be formatted as a date time.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target( { ElementType.METHOD, ElementType.FIELD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ import java.lang.annotation.RetentionPolicy;
|
|||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Indicates a property should be formatted as a ISO date time.
|
||||
* Declares that a field should be formatted as a ISO date time.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target( { ElementType.METHOD, ElementType.FIELD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import org.springframework.format.Printer;
|
|||
* Base class for annotation-based Joda DateTime formatters.
|
||||
* Can format any Joda {@link ReadableInstant} or {@link ReadablePartial} property, as well as standard {@link Date}, {@link Calendar}, and Long properties.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @param <A> the format annotation parameter type to be declared by subclasses
|
||||
*/
|
||||
abstract class AbstractDateTimeAnnotationFormatterFactory<A extends Annotation> implements AnnotationFormatterFactory<A> {
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
import org.springframework.format.annotation.DateTimeFormat.Style;
|
||||
|
||||
/**
|
||||
* Formats properties annotated with the {@link DateTimeFormat} annotation.
|
||||
*
|
||||
* Formats fields annotated with the {@link DateTimeFormat} annotation.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see DateTimeFormat
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import org.springframework.format.Parser;
|
|||
/**
|
||||
* Parses Joda Time {@link DateTime} instances using a {@link DateTimeFormatter}.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class DateTimeParser implements Parser<DateTime> {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ import org.springframework.format.annotation.ISODateTimeFormat;
|
|||
import org.springframework.format.annotation.ISODateTimeFormat.Style;
|
||||
|
||||
/**
|
||||
* Formats properties annotated with the {@link ISODateTimeFormat} annotation.
|
||||
*
|
||||
* Formats fields annotated with the {@link ISODateTimeFormat} annotation.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see ISODateTimeFormat
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import org.joda.time.format.DateTimeFormatter;
|
|||
* A context that holds user-specific Joda Time settings such as the user's Chronology (calendar system) and time zone.
|
||||
* A <code>null</code> property value indicate the user has not specified a setting.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see JodaTimeContextHolder
|
||||
*/
|
||||
public class JodaTimeContext {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import org.springframework.core.NamedInheritableThreadLocal;
|
|||
|
||||
/**
|
||||
* A holder for a thread-local user {@link JodaTimeContext}.
|
||||
* @since 3.0
|
||||
* @author Keith Donald
|
||||
*/
|
||||
public final class JodaTimeContextHolder {
|
||||
|
|
|
|||
|
|
@ -28,8 +28,9 @@ import org.springframework.core.convert.converter.Converter;
|
|||
import org.springframework.core.convert.converter.ConverterRegistry;
|
||||
|
||||
/**
|
||||
* Installs lower-level type converters required to integrate Joda Time support into Spring's formatting and field binding systems.
|
||||
* @author Keith Donald
|
||||
* Installs lower-level type converters required to integrate Joda Time support into Spring's field formatting system.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
final class JodaTimeConverters {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ import org.springframework.format.Printer;
|
|||
/**
|
||||
* Configures Joda Time's Formatting system for use with Spring.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see #setDateStyle(String)
|
||||
* @see #setTimeStyle(String)
|
||||
* @see #setTimeStyle(String)
|
||||
* @see #setUseISOFormat(boolean)
|
||||
* @see #installJodaTimeFormatting(FormatterRegistry)
|
||||
*/
|
||||
public class JodaTimeFormattingConfigurer {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import org.springframework.format.Printer;
|
|||
/**
|
||||
* Prints Long instances using a {@link DateTimeFormatter}.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class MillisecondInstantPrinter implements Printer<Long> {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import org.springframework.format.Printer;
|
|||
/**
|
||||
* Prints Joda Time {@link ReadableInstant} instances using a {@link DateTimeFormatter}.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class ReadableInstantPrinter implements Printer<ReadableInstant> {
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import org.springframework.format.Printer;
|
|||
/**
|
||||
* Prints Joda Time {@link ReadablePartial} instances using a {@link DateTimeFormatter}.
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
*/
|
||||
public final class ReadablePartialPrinter implements Printer<ReadablePartial> {
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class FormattingConversionService implements FormatterRegistry, Conversio
|
|||
|
||||
/**
|
||||
* Creates a new FormattingConversionService, initially with no Formatters registered.
|
||||
* The conversion logic contained in the parent is merged with this service.
|
||||
* The conversion logic contained in the specified parent is merged with this service.
|
||||
*/
|
||||
public FormattingConversionService(ConversionService parent) {
|
||||
this.conversionService.setParent(parent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue