Module uk.autores
Package uk.autores

Annotation Type Messages


  • @Target({PACKAGE,TYPE})
    @Retention(SOURCE)
    @Repeatable(RepeatableMessages.class)
    public @interface Messages
    Annotation for GenerateMessagesFromProperties.
    
         // 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 ResourceBundle with Properties Files for more information on localization.

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean format
      Generate format signatures.
      boolean isPublic
      Generated code visibility.
      boolean localize
      Search for localized properties.
      Severity missingKey
      How to handle missing keys in localized files.
      Processing processing
      Common processing instructions.
      String[] value
      Resource 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)
      • isPublic

        boolean isPublic
        Generated code visibility.
        Returns:
        visibility
        Default:
        false
      • localize

        boolean localize
        Search for localized properties.
        Returns:
        whether to localize
        Default:
        true
      • format

        boolean format
        Generate format signatures.
        Returns:
        whether to format
        Default:
        true
      • missingKey

        Severity missingKey
        How to handle missing keys in localized files.
        Returns:
        error severity
        Default:
        uk.autores.Severity.ERROR