Class I18nFormatUtil
java.lang.Object
org.checkerframework.checker.i18nformatter.util.I18nFormatUtil
This class provides a collection of utilities to ease working with i18n format strings.
- See the Checker Framework Manual:
- Internationalization Format String Checker
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic I18nConversionCategory[]formatParameterCategories(String format) Returns aI18nConversionCategoryfor every conversion found in the format string.static booleanhasFormat(String format, I18nConversionCategory... cc) Returns true if the format string is satisfiable, and if the format's parameters match the passedI18nConversionCategorys.static booleanstatic voidtryFormatSatisfiability(String format) Throws an exception if the format is not syntactically valid.
- 
Constructor Details- 
I18nFormatUtilpublic I18nFormatUtil()
 
- 
- 
Method Details- 
tryFormatSatisfiabilityThrows an exception if the format is not syntactically valid.- Parameters:
- format- the format string to parse
- Throws:
- IllegalFormatException
 
- 
formatParameterCategoriespublic static I18nConversionCategory[] formatParameterCategories(String format) throws IllegalFormatException Returns aI18nConversionCategoryfor every conversion found in the format string.- Parameters:
- format- the format string to parse
- Throws:
- IllegalFormatException- if the format is not syntactically valid
 
- 
hasFormatReturns true if the format string is satisfiable, and if the format's parameters match the passedI18nConversionCategorys. Otherwise an error is thrown.- Parameters:
- format- a format string
- cc- a list of expected categories for the string's format specifiers
- Returns:
- true if the format string's specifiers are the given categories, in order
 
- 
isFormat
 
-