Interface JsMessage.IdGenerator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String generateId​(java.lang.String meaning, java.util.List<java.lang.CharSequence> messageParts)
      Generate the ID for the message.
    • Method Detail

      • generateId

        java.lang.String generateId​(java.lang.String meaning,
                                    java.util.List<java.lang.CharSequence> messageParts)
        Generate the ID for the message. Messages with the same messageParts and meaning will get the same id. Messages with the same id will get the same translation.
        Parameters:
        meaning - The programmer-specified meaning. If no @meaning annotation appears, we will use the name of the variable it's assigned to. If the variable is unnamed, then we will just use a fingerprint of the message.
        messageParts - The parts of the message, including the main message text.