Polishing
This commit is contained in:
@@ -82,23 +82,23 @@ public @interface DateTimeFormat {
|
||||
/**
|
||||
* Common ISO date time format patterns.
|
||||
*/
|
||||
public enum ISO {
|
||||
enum ISO {
|
||||
|
||||
/**
|
||||
* The most common ISO Date Format {@code yyyy-MM-dd},
|
||||
* e.g. 2000-10-31.
|
||||
* e.g. "2000-10-31".
|
||||
*/
|
||||
DATE,
|
||||
|
||||
/**
|
||||
* The most common ISO Time Format {@code HH:mm:ss.SSSZ},
|
||||
* e.g. 01:30:00.000-05:00.
|
||||
* e.g. "01:30:00.000-05:00".
|
||||
*/
|
||||
TIME,
|
||||
|
||||
/**
|
||||
* The most common ISO DateTime Format {@code yyyy-MM-dd'T'HH:mm:ss.SSSZ},
|
||||
* e.g. 2000-10-31 01:30:00.000-05:00.
|
||||
* e.g. "2000-10-31 01:30:00.000-05:00".
|
||||
* <p>This is the default if no annotation value is specified.
|
||||
*/
|
||||
DATE_TIME,
|
||||
|
||||
@@ -70,11 +70,11 @@ public @interface NumberFormat {
|
||||
/**
|
||||
* Common number format styles.
|
||||
*/
|
||||
public enum Style {
|
||||
enum Style {
|
||||
|
||||
/**
|
||||
* The default format for the annotated type: typically number
|
||||
* but possibly currency for a money type.
|
||||
* The default format for the annotated type: typically 'number' but possibly
|
||||
* 'currency' for a money type (e.g. {@code javax.money.MonetaryAmount)}.
|
||||
* @since 4.2
|
||||
*/
|
||||
DEFAULT,
|
||||
@@ -84,15 +84,15 @@ public @interface NumberFormat {
|
||||
*/
|
||||
NUMBER,
|
||||
|
||||
/**
|
||||
* The currency format for the current locale.
|
||||
*/
|
||||
CURRENCY,
|
||||
|
||||
/**
|
||||
* The percent format for the current locale.
|
||||
*/
|
||||
PERCENT
|
||||
PERCENT,
|
||||
|
||||
/**
|
||||
* The currency format for the current locale.
|
||||
*/
|
||||
CURRENCY
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,12 +61,12 @@ public class NumberFormatAnnotationFormatterFactory extends EmbeddedValueResolut
|
||||
}
|
||||
else {
|
||||
Style style = annotation.style();
|
||||
if (style == Style.PERCENT) {
|
||||
return new PercentStyleFormatter();
|
||||
}
|
||||
else if (style == Style.CURRENCY) {
|
||||
if (style == Style.CURRENCY) {
|
||||
return new CurrencyStyleFormatter();
|
||||
}
|
||||
else if (style == Style.PERCENT) {
|
||||
return new PercentStyleFormatter();
|
||||
}
|
||||
else {
|
||||
return new NumberStyleFormatter();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user