public abstract @interface

NumberFormat

implements Annotation
org.springframework.format.annotation.NumberFormat

Class Overview

Declares that a field should be formatted as a number. Supports formatting by style or custom pattern string. Can be applied to any JDK java.lang.Number type.

For style-based formatting, set the #style() attribute to be the desired NumberFormat.Style. For custom formatting, set the #pattern() attribute to be the number pattern, such as #,###.##.

Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs). When the pattern attribute is specified, it takes precedence over the style attribute. When no annotation attributes are specified, the default format applied is style-based with a style of NUMBER.

See Also

Summary

Nested Classes
enum NumberFormat.Style Common number format styles. 
[Expand]
Inherited Methods
From interface java.lang.annotation.Annotation