You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer, I would like to be able to conveniently associated a Formatter implementation with a particular object class by simply annotating that class.
Proposal: @Formatted
/**
* A type that can be formatted as a String for display in a UI.
* @author Keith Donald
* @since 3.0
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Formatted {
/**
* The Formatter that handles the formatting.
*/
Class<?> value();
}
I would also allow the Formatted on fields/properties, so that I can do the following:
public class Person {
@Formatted(HomeAddressFormatter.class)
private Address homeAddress;
@Formatted(WorkAddressFormatter.class)
private Address workAddress;
}
the above example is a bit contrived, but you know what I'm aiming for.
Keith Donald opened SPR-6013 and commented
As a developer, I would like to be able to conveniently associated a Formatter implementation with a particular object class by simply annotating that class.
Proposal:
@Formatted
Referenced from: commits 20f5f99, 2381452
The text was updated successfully, but these errors were encountered: