Class MessageFormatValidator
java.lang.Object
org.jboss.logging.processor.validation.AbstractFormatValidator
org.jboss.logging.processor.validation.MessageFormatValidator
- All Implemented Interfaces:
FormatValidator
Represents a
MessageFormat string.
**Note: Currently the format type and format style are not validated
Date: 14.06.2011-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final Stringprivate final Set<FormatPart> private final Set<MessageFormatPart> static final Patternprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe number of arguments needed for the format.format()Returns the format string used for validation.private voidinit()booleanisValid()Returnstrueof the format is valid, otherwisefalse.static MessageFormatValidatorstatic MessageFormatValidatorstatic MessageFormatValidatorprivate voidparameterCheck(int parameterCount) private voidparameterCheck(Object... parameters) toString()private voidvalidate()Methods inherited from class AbstractFormatValidator
detailMessage, setDetailMessage, setDetailMessage, setSummaryMessage, setSummaryMessage, summaryMessage
-
Field Details
-
PATTERN
-
formatParts
-
formats
-
argumentCount
private int argumentCount -
valid
private boolean valid -
format
-
-
Constructor Details
-
MessageFormatValidator
-
-
Method Details
-
of
-
of
-
of
-
argumentCount
public int argumentCount()Description copied from interface:FormatValidatorThe number of arguments needed for the format.- Returns:
- the number of arguments needed.
-
format
Description copied from interface:FormatValidatorReturns the format string used for validation.- Returns:
- the format string.
-
isValid
public boolean isValid()Description copied from interface:FormatValidatorReturnstrueof the format is valid, otherwisefalse.- Returns:
trueof the format is valid, otherwisefalse.
-
validate
private void validate() -
parameterCheck
-
parameterCheck
private void parameterCheck(int parameterCount) -
init
private void init() -
toString
-