Annotation Type MessageBundle


@Target(TYPE) @Retention(CLASS) @Documented public @interface MessageBundle
Signify that an interface is a message bundle interface.
Author:
David M. Lloyd
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Get the project code for messages that have an associated code.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The length of the padding used for each id in the message bundle.
    Specifies the locale for formatting bundle messages.
  • Element Details

    • projectCode

      String projectCode
      Get the project code for messages that have an associated code. If no project code is associated with this bundle, specify "" (the empty string).
      Returns:
      the project code
    • length

      int length
      The length of the padding used for each id in the message bundle. For example given the default padding length of 6 and a message with an id of 100 would result would be "000100".

      Valid values a range of 3 to 8. Any value less than 0 turns off padding. Any other value will result in an error being produced.

      Returns:
      the length the id should be padded
      Default:
      6
    • rootLocale

      String rootLocale
      Specifies the locale for formatting bundle messages. This is only used in the super implementation. Subclasses will define their own locale to use based on the name of the resource bundle at compile time.

      An empty string will default to Locale.ROOT.

      A non-empty string will be parsed by the Locale.forLanguageTag(String). This uses the IETF BCP 47 format.

      Returns:
      the default locale message bundles should use for formatting messages
      Default:
      ""