Package com.google.javascript.jscomp
Class ReplaceMessages.ProtectedJsMessage
- java.lang.Object
-
- com.google.javascript.jscomp.ReplaceMessages.ProtectedJsMessage
-
- Enclosing class:
- ReplaceMessages
public static class ReplaceMessages.ProtectedJsMessage extends java.lang.Object
Holds information about the protected form of a translatable message that appears in the AST.The original translatable messages are replaced with this protected form by the logic in `ReplaceMessages` to protect the message information through the optimization passes.
// original var MSG_GREETING = goog.getMsg('Hello, {$name}!', {name: person.getName()}, {html: false}); // protected form var MSG_GREETING = __jscomp_define_msg__( { 'key': 'MSG_GREETING', 'msg_text': 'Hello, {$name}!', 'escapeLessThan': '' }, {'name': person.getName()});
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReplaceMessages.ProtectedJsMessage
fromAstNode(Node node, JsMessage.IdGenerator idGenerator)
-
-
-
Method Detail
-
fromAstNode
@Nullable public static ReplaceMessages.ProtectedJsMessage fromAstNode(Node node, JsMessage.IdGenerator idGenerator)
-
-