Package com.google.javascript.jscomp
Class EmptyMessageBundle
java.lang.Object
com.google.javascript.jscomp.EmptyMessageBundle
- All Implemented Interfaces:
MessageBundle
An implementation of MessageBundle that has no translations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns an empty list of messages.getMessage
(String id) Returns null, to indicate it has no message replacements.Gets a dummy message ID generator.
-
Constructor Details
-
EmptyMessageBundle
public EmptyMessageBundle()
-
-
Method Details
-
idGenerator
Gets a dummy message ID generator.- Specified by:
idGenerator
in interfaceMessageBundle
- Returns:
- idGenerator instance or null if we do not want to use any custom id generation. In case if idGenerator is null caller should decide how to create id by itself. In the most cases using the message key is enough.
-
getMessage
Returns null, to indicate it has no message replacements.- Specified by:
getMessage
in interfaceMessageBundle
- Parameters:
id
- the id of the message being replaced; the key is message ID generated byJsMessage.IdGenerator
- Returns:
- the message replacement, which may be null.
-
getAllMessages
Returns an empty list of messages.- Specified by:
getAllMessages
in interfaceMessageBundle
- Returns:
- all messages from this bundle.
-