Interface JsMessage.Part

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getCanonicalPlaceholderName()
      Gets the name of the placeholder as it would appear in XMB or XTB files, and also the form it takes when generating message IDs.
      java.lang.String getJsPlaceholderName()
      Gets the name of the placeholder as it would appear in JS code.
      java.lang.String getString()
      Gets the literal string for this message part.
      boolean isPlaceholder()
      True for placeholders, false for literal string parts.
    • Method Detail

      • isPlaceholder

        boolean isPlaceholder()
        True for placeholders, false for literal string parts.
      • getJsPlaceholderName

        java.lang.String getJsPlaceholderName()
        Gets the name of the placeholder as it would appear in JS code.

        In JS code placeholders are in lower camel case with zero or more trailing numeric suffixes (e.g. myPlaceholderName_123_456).

        Returns:
        the name for a placeholder
        Throws:
        java.lang.UnsupportedOperationException - if this is not a JsMessage.PlaceholderReference.
      • getCanonicalPlaceholderName

        java.lang.String getCanonicalPlaceholderName()
        Gets the name of the placeholder as it would appear in XMB or XTB files, and also the form it takes when generating message IDs.

        This format is UPPER_SNAKE_CASE.

        Returns:
        the name for a placeholder
        Throws:
        java.lang.UnsupportedOperationException - if this is not a JsMessage.PlaceholderReference.
      • getString

        java.lang.String getString()
        Gets the literal string for this message part.
        Returns:
        the literal string for JsMessage.StringPart.
        Throws:
        java.lang.UnsupportedOperationException - if this is not a JsMessage.StringPart.