@Inherited @Documented @Target(value=FIELD) @Retention(value=RUNTIME) public @interface Convert
Tells Rewrite to use a converter to convert the value of a specific parameter binding.
There are various ways to specify the kind of converter you want to use. You could for example reference a converter class this way:@ParameterBinding @Convert(with = MyLocaleConverter.class) private Locale locale;
You can always refer to Converter implementations this way. Integration modules like the JSF integration
module provide support for frameworks specific converters on top of that.
You can also refer to a converter using an unique ID like this:
@ParameterBinding @Convert(id = "com.example.MyConverterId") private Locale locale;
Without any attributes set, Rewrite will try to find a converter by the type of the annotated field.
@ParameterBinding @Convert private Locale locale;
Please note that which of the three ways works in your case highly depends on the integration modules that you have added to your application.
Copyright © 2016 OCPsoft. All rights reserved.