public class FormatUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FormatUtil.ExcessiveOrMissingFormatArgumentException |
static class |
FormatUtil.IllegalFormatConversionCategoryException |
| Constructor and Description |
|---|
FormatUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
asFormat(java.lang.String format,
ConversionCategory... cc)
Returns if the format string is satisfiable, and if the format's parameters match the passed
ConversionCategorys. |
static ConversionCategory[] |
formatParameterCategories(java.lang.String format)
Returns a
ConversionCategory for every conversion found in the format string. |
static void |
tryFormatSatisfiability(java.lang.String format)
Throws an exception if the format is not syntactically valid.
|
@ReturnsFormat public static java.lang.String asFormat(java.lang.String format, ConversionCategory... cc) throws java.util.IllegalFormatException
ConversionCategorys. Otherwise an Error is thrown.
TODO introduce more such functions, see RegexUtil for examples
java.util.IllegalFormatExceptionpublic static void tryFormatSatisfiability(java.lang.String format)
throws java.util.IllegalFormatException
java.util.IllegalFormatExceptionpublic static ConversionCategory[] formatParameterCategories(java.lang.String format) throws java.util.IllegalFormatException
ConversionCategory for every conversion found in the format string.
Throws an exception if the format is not syntactically valid.
java.util.IllegalFormatException