Package com.google.javascript.jscomp
Class JsMessage.StringPart
java.lang.Object
com.google.javascript.jscomp.JsMessage.StringPart
- All Implemented Interfaces:
JsMessage.Part
- Enclosing class:
JsMessage
Represents a literal string part of a message.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsMessage.StringPart
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.Gets the name of the placeholder as it would appear in JS code.abstract String
Gets the literal string for this message part.boolean
True for placeholders, false for literal string parts.
-
Constructor Details
-
StringPart
public StringPart()
-
-
Method Details
-
getString
Description copied from interface:JsMessage.Part
Gets the literal string for this message part.- Specified by:
getString
in interfaceJsMessage.Part
- Returns:
- the literal string for
JsMessage.StringPart
.
-
create
-
isPlaceholder
public boolean isPlaceholder()Description copied from interface:JsMessage.Part
True for placeholders, false for literal string parts.- Specified by:
isPlaceholder
in interfaceJsMessage.Part
-
getJsPlaceholderName
Description copied from interface:JsMessage.Part
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).
- Specified by:
getJsPlaceholderName
in interfaceJsMessage.Part
- Returns:
- the name for a placeholder
-
getCanonicalPlaceholderName
Description copied from interface:JsMessage.Part
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.
- Specified by:
getCanonicalPlaceholderName
in interfaceJsMessage.Part
- Returns:
- the name for a placeholder
-