public @interface Localize
Annotation type for marking localization patterns.
Besides the default way of dealing with the automatic processing of localization patterns in
classes by declaring global fields starting with "I18N_" or ending with "_I18N" this annotation
type can be used. Instead of declaring separate global fields for localization a simple
annotation with retention policy RUNTIME can be utilized. The annotation holds the name of
the localized field which is virtual here and needs not to be declared by the class. The
I18NExtractor tool can then parse the annotations and add localization variables to the
localization resource files as if the fields were declared. Using annotations the automatic
extraction of localization patterns is possible, but the localization of the class instances
cannot be automated trivially. Extraction saves a lot of development time and keeps the
localization up with the implementation. Auto-localization can be performed only if global
fields are used, but this seems to be slow and pumps up the classes. Annotations can help
out by allowing auto-extraction, keeping the class code separated from the metadata, but
needs a bit more handwork for instance localization.