-
@Target({PACKAGE,TYPE}) @Retention(SOURCE) @Repeatable(RepeatableMessages.class) public @interface Messages
Annotation forGenerateMessagesFromProperties.// EXAMPLE ANNOTATION // planets.properties // planet-event=At {1,time} on {1,date}, there was {2} on planet {0,number,integer}. // planets_de.properties // planet-event=Am {1,time} um {1,date} Uhr gab es {2} auf Planet {0,number,integer}. @Messages("planets.properties")// EXAMPLE CODE var time = ZonedDateTime.now(); String event = Planets.planetEvent(locale, 4, time, "an attack");See Backing a
ResourceBundlewith Properties Files for more information on localization.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanformatGenerate format signatures.booleanisPublicGenerated code visibility.booleanlocalizeSearch for localized properties.SeveritymissingKeyHow to handle missing keys in localized files.ProcessingprocessingCommon processing instructions.String[]valueResource files.
-
-
-
Element Detail
-
value
String[] value
Resource files.- Returns:
- resources
- Default:
- {}
-
-
-
processing
Processing processing
Common processing instructions.- Returns:
- instruction annotation
- Default:
- @uk.autores.Processing(namer=uk.autores.naming.IdiomaticNamer.class)
-
-
-
missingKey
Severity missingKey
How to handle missing keys in localized files.- Returns:
- error severity
- Default:
- uk.autores.Severity.ERROR
-
-