Class IcuMessageFormatSupport
- java.lang.Object
-
- de.codecamp.messages.shared.messageformat.IcuMessageFormatSupport
-
- All Implemented Interfaces:
MessageFormatSupport
public class IcuMessageFormatSupport extends Object implements MessageFormatSupport
ImplementsMessageFormatSupportforICU's MessageFormat.If changes are made to the checked types, this must be reflected in
IcuMessageArgConverter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.codecamp.messages.shared.messageformat.MessageFormatSupport
MessageFormatSupport.ArgInsert, MessageFormatSupport.TypeChecker
-
-
Constructor Summary
Constructors Constructor Description IcuMessageFormatSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>checkMessage(String message, String[] argTypes, String[] argNames, MessageFormatSupport.TypeChecker argTypeChecker)StringcreateMessageBundleComment(MessageKeyWithArgs key)StringformatArgType(String argType)Formats the given Java-type of a message argument to something less technical where possible.List<MessageFormatSupport.ArgInsert>getArgInsertOptions(MessageKeyWithArgs key)booleanhasArgNameSupport()booleansupportsFormat(String messageFormat)
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
supportsFormat
public boolean supportsFormat(String messageFormat)
- Specified by:
supportsFormatin interfaceMessageFormatSupport
-
hasArgNameSupport
public boolean hasArgNameSupport()
- Specified by:
hasArgNameSupportin interfaceMessageFormatSupport
-
formatArgType
public String formatArgType(String argType)
Description copied from interface:MessageFormatSupportFormats the given Java-type of a message argument to something less technical where possible.- Specified by:
formatArgTypein interfaceMessageFormatSupport- Parameters:
argType- the Java-type of the message argument- Returns:
- the formatted message argument type
-
getArgInsertOptions
public List<MessageFormatSupport.ArgInsert> getArgInsertOptions(MessageKeyWithArgs key)
- Specified by:
getArgInsertOptionsin interfaceMessageFormatSupport
-
createMessageBundleComment
public String createMessageBundleComment(MessageKeyWithArgs key)
- Specified by:
createMessageBundleCommentin interfaceMessageFormatSupport
-
checkMessage
public List<String> checkMessage(String message, String[] argTypes, String[] argNames, MessageFormatSupport.TypeChecker argTypeChecker)
- Specified by:
checkMessagein interfaceMessageFormatSupport
-
-