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 int
private final String
private final Set
<FormatPart> private final Set
<MessageFormatPart> static final Pattern
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
The number of arguments needed for the format.format()
Returns the format string used for validation.private void
init()
boolean
isValid()
Returnstrue
of the format is valid, otherwisefalse
.static MessageFormatValidator
static MessageFormatValidator
static MessageFormatValidator
private void
parameterCheck
(int parameterCount) private void
parameterCheck
(Object... parameters) toString()
private void
validate()
Methods inherited from class org.jboss.logging.processor.validation.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:FormatValidator
The number of arguments needed for the format.- Returns:
- the number of arguments needed.
-
format
Description copied from interface:FormatValidator
Returns the format string used for validation.- Returns:
- the format string.
-
isValid
public boolean isValid()Description copied from interface:FormatValidator
Returnstrue
of the format is valid, otherwisefalse
.- Returns:
true
of the format is valid, otherwisefalse
.
-
validate
private void validate() -
parameterCheck
-
parameterCheck
private void parameterCheck(int parameterCount) -
init
private void init() -
toString
-